backoff icon indicating copy to clipboard operation
backoff copied to clipboard

Python library providing function decorators for configurable backoff and retry

Results 69 backoff issues
Sort by recently updated
recently updated
newest added

Is there a way to specify a minimum delay? For example, we want the first retry to be at 15 seconds and then increase the delay per the formula? ```python...

Look at this simple example and notice the waiting times does not increase as expected: ``` In [23]: def backoff_hdlr(details): ...: print ("Backing off {wait:0.1f} seconds afters {tries} tries "...

It would be useful to have an `on_attempt` callback which was called before every invocation of the decorated function - seems like that would complete the callback suite :) My...

It would be nice if the current exception being handled in `on_exception` function could pass the exception's instance to the `on_giveup` handler. Also i've noticed that there's only an "empty"...

I currently have a function that looks like the following: ```python @backoff.on_exception( backoff.expo, RuntimeError, max_time=30 ) def get_rules(url): response = requests.get(url) if not response.ok: msg = 'Unable to get latest...

@bgreen-litl pls review - Add `factor` decorator to control sleep time unit. ``` >>> x = backoff.on_exception(backoff.fibo, Exception, max_tries=4, jitter=None)(t) >>> x() Backing off t() 1.0s (Exception: a) Backing off...

* Allow passing coroutine functions to `on_*` handlers by also accepting `Callable[[Details], Coroutine[Any, Any, None]` for `_Handler`. * Make `None` explicit for `on_success`, `on_backoff`, `on_giveup`. * Better solution for `TypedDict`...

c.f. https://github.com/litl/backoff/issues/75

As a first-time user of backoff I tried decorating with a slight variation of the example in the README: ``` @backoff.on_predicate(backoff.fibo, lambda x: x != "SUCCEEDED", max_value=13) ``` My decorated...