backoff icon indicating copy to clipboard operation
backoff copied to clipboard

Customize backoff.expo

Open StefanSchuhart opened this issue 2 years ago • 1 comments

How can one customize backoff.expo, e.g. max_value?

StefanSchuhart avatar Jun 09 '22 11:06 StefanSchuhart

Please read the README. It's the best documentation for now. Short answer is the keyword args of the wait generators (backoff.expo, backoff.expo, etc. can be specified as arguments to the decorator itself.

@backoff.on_exception(backoff.expo, ValueError, max_value=10)
def do_something():
    # ...

r3g3 avatar Jun 17 '22 01:06 r3g3