-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Redis cluster commands #685
Conversation
Currently the CI fails because the lengthy mocked Redis raw response breaks the pep8 check. I prefer to keep the raw response as it is with an ignore comment. I could also break down the long string into tuples and then join them later. It's up to maintainer's decision. |
@andymccurdy Hi, is there a timetable for review the PR? It is quite essential for anyone who is running Redis Cluster. |
@andymccurdy Ping. I've pep8ed the code and please review the PR. |
Hey, sorry for the delay. This seems mostly fine. It might be nice to create separate methods for each cluster command (similar to how the sentinel commands are implemented. I'll go ahead and merge this anyway. Thanks for doing this. |
@andymccurdy That was quick. Thanks for the merge! I'll consider the advice. Current design aligns with the cluster command in ruby client. |
@drabaioli Hi! @Grokzen has explained most of the things. I'll add a bit more. Basically, even though redis-py-cluster provides most of the features you need to talk to Redis Cluster, you still need the ability to talk to one specific node inside the cluster. e.g. |
In some cases, you still need
redis-py
to perform cluster related commands, e.g.slaves
,info
,replicated
. This PR implements all the cluster commands (cluster sub-command args
).Because of the special reply from Redis Cluster, the tests mock out all the responses from Redis server and test it against mock response.
Cheers.