-
-
Notifications
You must be signed in to change notification settings - Fork 307
Closed
Labels
Description
The comment in class wait_chan is wrong.
class wait_chain(wait_base):
"""Chain two or more waiting strategies.
If all strategies are exhausted, the very last strategy is used
thereafter.
For example::
@retry(wait=wait_chain(*[wait_fixed(1) for i in range(3)] +
[wait_fixed(2) for j in range(5)] +
[wait_fixed(5) for k in range(4)))
def wait_chained():
print("Wait 1s for 3 attempts, 2s for 5 attempts and 5s
thereafter.")
"""
def __init__(self, *strategies):
self.strategies = [_compat.wait_func_accept_retry_state(strategy)
for strategy in strategies]At line 98, should insert a ']' before the second to last ')'.
@retry(wait=wait_chain(*[wait_fixed(1) for i in range(3)] +
[wait_fixed(2) for j in range(5)] +
[wait_fixed(5) for k in range(4)])) Reactions are currently unavailable