get_exponential_backoff_interval
Calculate the exponential backoff wait time.
def get_exponential_backoff_interval(
factor: int,
retries: int,
maximum: int,
full_jitter: boolean = False
) - > int
Calculate the exponential backoff wait time.
Parameters
| Name | Type | Description |
|---|---|---|
| factor | int | The base multiplier used to scale the initial wait time. |
| retries | int | The number of retry attempts already made, used as the exponent for the backoff calculation. |
| maximum | int | The upper bound limit for the wait time to prevent excessively long delays. |
| full_jitter | boolean = False | Whether to apply a random distribution to the wait time to prevent thundering herd problems. |
Returns
| Type | Description |
|---|---|
int | The calculated wait time in seconds or milliseconds, capped by the maximum value and never less than zero. |