backoff
backoff copied to clipboard
max_time only applies _after_ first retry?
Why does this still retry when the decorated function takes longer than max_time?
import backoff
import time
@backoff.on_exception(
backoff.expo,
(
Exception,
),
max_time=2,
jitter=None
)
def do_thing():
print(f"doing thing")
time.sleep(5)
print(f"end thing")
raise Exception("I failed")
do_thing()