prefactor_http.retry module
prefactor_http.retry module
Section titled “prefactor_http.retry module”Retry logic with exponential backoff and jitter.
class prefactor_http.retry.RetryHandler(config: HttpClientConfig)
Section titled “class prefactor_http.retry.RetryHandler(config: HttpClientConfig)”Bases: object
Handles retry logic with exponential backoff and jitter.
async execute(operation: Callable[[…], Any], is_retryable: Callable[[Exception], bool], *args: Any, **kwargs: Any) → Any
Section titled “async execute(operation: Callable[[…], Any], is_retryable: Callable[[Exception], bool], *args: Any, **kwargs: Any) → Any”Execute an operation with retry logic.
- Parameters:
- operation – Async function to execute.
- is_retryable – Function that determines if an exception is retryable.
- *args – Positional arguments for the operation.
- **kwargs – Keyword arguments for the operation.
- Returns: Result of the operation.
- Raises: PrefactorRetryExhaustedError – When all retry attempts are exhausted.