-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefix based router support #12
base: master
Are you sure you want to change the base?
Conversation
tschellenbach
commented
May 15, 2012
|
||
'redis': { | ||
'engine': 'nydus.db.backends.redis.Redis', | ||
'router': 'django_redis.nydus_router.PrefixPartitionRouter', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path needs updated, right?
I wonder if this would be a good time to add some kind of router options to the configuration. That could help a lot if we wanted to address #11 by not requiring the dict config approach |
""" | ||
Perform routing and return db_nums | ||
""" | ||
assert 'default' in cluster.hosts, 'The prefix router requires a default key to route to' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I missed something, but is there a default
host in your example docstring?
Nice work. Can you also add a couple more tests to test the code paths in |
Awesome, thanks for the very thorough feedback. Good to see such traction behind the project. We've forked Nydus for 2 reasons.
Both features are unit tested and included in the pull request. |