maple.utils.retry.RetryConfig
- class maple.utils.retry.RetryConfig(max_attempts: int = 3, delay: float = 1.0, backoff: float = 2.0, max_delay: float = 30.0, exceptions: ~typing.Tuple[~typing.Type[Exception], ...] = (<class 'Exception'>,))
Configuration container for retry behavior.
Encapsulates all retry parameters in a reusable dataclass. This allows creating named retry configurations that can be shared across multiple functions or stored as constants.
Methods
__init__(max_attempts, delay, backoff, ...)Attributes
Multiplier applied to delay after each failed attempt.
Initial delay in seconds between retry attempts.
Tuple of exception types to catch and retry on.
Maximum number of execution attempts before giving up.
Maximum delay cap in seconds.