mirror of https://github.com/celery/kombu.git
This reverts #954, and bumps the required redis-py dependency to 3.2.0
to include this fix:
4e1e748092
Fixes #1006
This commit is contained in:
parent
30f52ad329
commit
eb6e4c8d51
|
@ -931,22 +931,8 @@ class Channel(virtual.Channel):
|
|||
if asynchronous:
|
||||
class Connection(connection_cls):
|
||||
def disconnect(self):
|
||||
# NOTE: see celery issue #3898
|
||||
# redis-py Connection shutdown()s the socket
|
||||
# which causes all copies of file descriptor
|
||||
# to become unusable, however close() only
|
||||
# affect process-local copies of fds.
|
||||
# So we just override Connection's disconnect method.
|
||||
self._parser.on_disconnect()
|
||||
super(Connection, self).disconnect()
|
||||
channel._on_connection_disconnect(self)
|
||||
if self._sock is None:
|
||||
return
|
||||
try:
|
||||
# self._sock.shutdown(socket.SHUT_RDWR)
|
||||
self._sock.close()
|
||||
except socket.error:
|
||||
pass
|
||||
self._sock = None
|
||||
connection_cls = Connection
|
||||
|
||||
connparams['connection_class'] = connection_cls
|
||||
|
@ -964,9 +950,9 @@ class Channel(virtual.Channel):
|
|||
return redis.ConnectionPool(**params)
|
||||
|
||||
def _get_client(self):
|
||||
if redis.VERSION < (2, 10, 5):
|
||||
if redis.VERSION < (3, 2, 0):
|
||||
raise VersionMismatch(
|
||||
'Redis transport requires redis-py versions 2.10.5 or later. '
|
||||
'Redis transport requires redis-py versions 3.2.0 or later. '
|
||||
'You have {0.__version__}'.format(redis))
|
||||
return redis.StrictRedis
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
redis>=2.10.5
|
||||
redis>=3.2.0
|
||||
|
|
Loading…
Reference in New Issue