asyncio-redis
asyncio-redis copied to clipboard
pubsub incompatible with auto_reconnect
auto_reconnect
can't be used with a connection with a pubsub subscription if the connection uses a password or specific db.
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/tasks.py", line 238, in _step
result = next(coro)
File "/Users/jhoarau/src/atlassian/misc/hc-standup2/venv/lib/python3.4/site-packages/asyncio_redis/protocol.py", line 813, in initialize
yield from self.auth(self.password)
File "/Users/jhoarau/src/atlassian/misc/hc-standup2/venv/lib/python3.4/site-packages/asyncio_redis/protocol.py", line 643, in wrapper
raise Error('Cannot run command inside pubsub subscription.')
auto_reconnect
is broken even if a connection does not use any password or specific db. It will not re-subscribe after reconnect and the client will stuck forever. Broken re-authorization just makes the problem more apparent.