backoff
backoff copied to clipboard
Python library providing function decorators for configurable backoff and retry
Hello, What would be the canonical way to handle error bursting and enter an "error-disable" state? Imagine you have a very long running function, such as HTTP polling, which from...
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")...
Hi, first of all, a huge THANK YOU to all the contributors of this wonderful package. I have been using backoff for a while now and I am amazed at...
I have an api I'm trying to hit with the code below. How do I implement this code I have into backoff? I don't see any example and I'm confused...
Python 3.10.5 (main, Jul 25 2022, 15:40:10) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin backoff==2.2.1 Run this example: ```python import sys import backoff import logging logging.basicConfig() retry_runtime_error = backoff.on_exception( backoff.constant, RuntimeError, max_tries=2,...
Hello, thank you for a grate tool! Is it possible to not write error messages in case of giving up due to using giveup attribute? Case is similar to this...
moving from `datetime.now()` to `time.monotonic()` minimum fix for https://github.com/litl/backoff/issues/149 pytest looks green ```bash (base) lcb@lcbs-MacBook-Pro backoff % pytest ====================================================================== test session starts ====================================================================== platform darwin -- Python 3.12.1, pytest-8.0.2, pluggy-1.4.0...
I'm probably missing something here, but I don't see an obvious reason why this is not done this way
This took me a bit to figure out. The wording on `on_predicate` made it sound like the predicate argument could be either an exception or a value, but this is...