Decorators
retry(exceptions, tries=4, delay=3, backoff=2, fatal_exceptions=None, logger=None)
¶
Retry calling the decorated function using an exponential backoff.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exceptions |
Union[Type[Exception], Tuple[Type[Exception]]]
|
The exception to check. may be a tuple of exceptions to check. |
required |
tries |
int
|
Number of times to try (not retry) before giving up. |
4
|
delay |
int
|
Initial delay between retries in seconds. |
3
|
backoff |
int
|
Backoff multiplier (e.g. value of 2 will double the delay each retry). |
2
|
logger |
Logger to use. If None, print. |
None
|