Adding retry_on_timeout parameter (#1150)

* added retry_on_timeout connparam

* added retry_on_timeout to tests

* updated Pyro4

* revert Pyro4 in requirements

* Trigger notification

* Trigger rebuild
This commit is contained in:
Konstantin Seleznev 2020-02-02 18:01:56 +03:00 committed by GitHub
parent cbd327dc3b
commit e1dcfaef4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -427,6 +427,7 @@ class Channel(virtual.Channel):
socket_connect_timeout = None socket_connect_timeout = None
socket_keepalive = None socket_keepalive = None
socket_keepalive_options = None socket_keepalive_options = None
retry_on_timeout = None
max_connections = 10 max_connections = 10
health_check_interval = DEFAULT_HEALTH_CHECK_INTERVAL health_check_interval = DEFAULT_HEALTH_CHECK_INTERVAL
#: Transport option to disable fanout keyprefix. #: Transport option to disable fanout keyprefix.
@ -493,6 +494,7 @@ class Channel(virtual.Channel):
'queue_order_strategy', 'queue_order_strategy',
'max_connections', 'max_connections',
'health_check_interval', 'health_check_interval',
'retry_on_timeout',
'priority_steps') # <-- do not add comma here! 'priority_steps') # <-- do not add comma here!
) )
@ -907,6 +909,7 @@ class Channel(virtual.Channel):
'socket_keepalive': self.socket_keepalive, 'socket_keepalive': self.socket_keepalive,
'socket_keepalive_options': self.socket_keepalive_options, 'socket_keepalive_options': self.socket_keepalive_options,
'health_check_interval': self.health_check_interval, 'health_check_interval': self.health_check_interval,
'retry_on_timeout': self.retry_on_timeout,
} }
conn_class = self.connection_class conn_class = self.connection_class

View File

@ -1441,7 +1441,8 @@ class test_RedisSentinel:
connection_class=mock.ANY, db=0, max_connections=10, connection_class=mock.ANY, db=0, max_connections=10,
min_other_sentinels=0, password=None, sentinel_kwargs=None, min_other_sentinels=0, password=None, sentinel_kwargs=None,
socket_connect_timeout=None, socket_keepalive=None, socket_connect_timeout=None, socket_keepalive=None,
socket_keepalive_options=None, socket_timeout=None) socket_keepalive_options=None, socket_timeout=None,
retry_on_timeout=None)
master_for = patched.return_value.master_for master_for = patched.return_value.master_for
master_for.assert_called() master_for.assert_called()
@ -1463,7 +1464,8 @@ class test_RedisSentinel:
connection_class=mock.ANY, db=0, max_connections=10, connection_class=mock.ANY, db=0, max_connections=10,
min_other_sentinels=0, password=None, sentinel_kwargs=None, min_other_sentinels=0, password=None, sentinel_kwargs=None,
socket_connect_timeout=None, socket_keepalive=None, socket_connect_timeout=None, socket_keepalive=None,
socket_keepalive_options=None, socket_timeout=None) socket_keepalive_options=None, socket_timeout=None,
retry_on_timeout=None)
master_for = patched.return_value.master_for master_for = patched.return_value.master_for
master_for.assert_called() master_for.assert_called()