Retry Policy API Reference¶
Configurable retry mechanism with exponential backoff for fault-tolerant operations.
RetryPolicy
dataclass
¶
Configures retry behavior for any Istos decorator. Uses exponential backoff: delay * (2 ** attempt).
Source code in src/istos/retry.py
execute_with_retry(func, policy, *args, **kwargs)
async
¶
Executes a callable with retry logic and exponential backoff.
If all retries are exhausted and on_failure is set, it is called
with the last exception. The exception is then re-raised either way, so a
dead-letter hook cannot turn a failed call into a successful None.
Errors that asking again cannot fix (not_found, unauthorized; see
:func:istos.errors.is_retryable) fail on the first attempt.