sinch.core.clients.retry_manager module
- class sinch.core.clients.retry_manager.RetryManager(configuration: RetryConfiguration)[source]
Bases:
objectRetries a call while the configured policy keeps returning a delay.
- Parameters:
configuration (RetryConfiguration)
- RETRYABLE_STATUS_CODES = frozenset({429})
- BACKOFF_BASE_SECONDS = 1.0
- RETRY_AFTER_JITTER_SECONDS = 0.25
- execute(
- call: Callable[[], HTTPResponse],
Performs the call, retrying a rate-limited response for as long as the configured policy allows.
- Parameters:
call (Callable[[], HTTPResponse]) – The request to perform.
- Returns:
The response from the last attempt.
- Return type: