Support later tenacity versions
Instead of lambda func use the defined retry_never Retrying class. Change-Id: I756b44443d8b5892c04bd1be9faa010e39c763fc
This commit is contained in:
parent
7ee2780af8
commit
5fbb63fa4f
@ -6,7 +6,7 @@ stevedore>=1.16.0 # Apache-2.0
|
||||
voluptuous>=0.8.9 # BSD License
|
||||
msgpack>=0.4.0 # Apache-2.0
|
||||
fasteners>=0.7 # Apache-2.0
|
||||
tenacity>=3.2.1,<7.0.0 # Apache-2.0
|
||||
tenacity>=3.2.1 # Apache-2.0
|
||||
futurist>=1.2.0 # Apache-2.0
|
||||
oslo.utils>=4.7.0 # Apache-2.0
|
||||
oslo.serialization>=1.10.0 # Apache-2.0
|
||||
|
@ -22,7 +22,7 @@ _default_wait = wait.wait_exponential(max=1)
|
||||
|
||||
|
||||
def retry(stop_max_delay=None, **kwargs):
|
||||
k = {"wait": _default_wait, "retry": lambda x: False}
|
||||
k = {"wait": _default_wait, "retry": tenacity.retry_never}
|
||||
if stop_max_delay not in (True, False, None):
|
||||
k['stop'] = stop.stop_after_delay(stop_max_delay)
|
||||
return tenacity.retry(**k)
|
||||
|
Loading…
x
Reference in New Issue
Block a user