backoff icon indicating copy to clipboard operation
backoff copied to clipboard

Python library providing function decorators for configurable backoff and retry

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

I needed to restart an async iterator if it hadn't returned any items yet. The algorithm I needed was: * If an exception occurred before any item was returned, restart...

This patch fixes what I consider to be unexpected behavior: *Steps to reproduce* ``` import time import backoff @backoff.on_exception(backoff.constant, RuntimeError, jitter=None, max_time=1) def foo(): print("Running") time.sleep(2) raise def real_time(): start...

I think it would be great to add a `sleep` argument which defaults to `asyncio.sleep` to improve support for event loops besides `asyncio`, while keeping it working out of the...

I am calling some functions of a lib i wanna backoff. Problem is, I cannot modify the lib. > ``` python > import backoff > from requests.exceptions import TimeoutError >...

I have a use case for a 'giveup' function to work conditionally, based on the arguments passed to the function to be retried.

First: very cool/useful package! Thanks!! I would like to backoff/retry certain HTTP exceptions like 429, too many requests, but at the moment this isn't possible because there is only a...

For certain exceptions I that need to differentiate by their parameters and not their exception class, I would like to use a different backoff mechanism than for others that use...

First off, crackin' little library. Really like the api. However, in backoff.expo: https://github.com/litl/backoff/blob/master/backoff/_wait_gen.py#L14 Having n=0 means the second attempt will **always** happen only 1 second after the first attempt, regardles...

I have a project where I configure loggers in the root `__init__.py`: ```py # foo-project/foo/__init__.py import logging logging.getLogger('backoff').setLevel(logging.FATAL) ``` ```py # foo-project/foo/bar.py import backoff @backoff... def fn(...): pass ``` However,...

It would be great to have a minimum time to wait, to compliment the max_time.