-
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
issue with SUBSCRIBE and pipes #30
Comments
Also, the following does not work: redis.exists('z') pipe = redis.pipeline() pipe.zrange('z', 0, -1) pipe.subscribe('z') msgs, subs = pipe.execute() print msgs redis.unsubscribe() print 'unsubscribed' redis.exists('z') pipe = redis.pipeline() pipe.zrange('z', 0, -1) pipe.subscribe('z') msgs, subs = pipe.execute() # fails here print msgs redis.unsubscribe() Traceback (most recent call last): File "sub.py", line 36, in msgs, subs = pipe.execute() File "/home/tom/lib/redis/client.py", line 1151, in execute return execute(stack) File "/home/tom/lib/redis/client.py", line 1120, in _execute_transaction raise ResponseError("Wrong number of response items from " redis.exceptions.ResponseError: Wrong number of response items from pipline execution BTW: "pipline" has a typo. |
So I took another look at this during PyCon. I'm tempted to just make calling (P)SUBSCRIBE, (P)UNSUBSCRIBE and LISTEN impossible from pipelines. Can anyone give me a use case why they'd want to subscribe or listen to channels from a pipeline? |
redis-py 2.4 removes the ability for pipelines to subscribe to channels. |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: