maple.utils.retry
Retry utilities file.
This module provides decorators and utilities for automatic retry logic with exponential backoff. It helps handle transient failures in network operations, API calls, and other potentially flaky operations.
Key features: - Configurable retry attempts with exponential backoff - Exception filtering (retry only specific exception types) - Maximum delay cap to prevent excessive waiting - Decorator and functional retry patterns - Dataclass-based configuration for reusability - Comprehensive logging of retry attempts
The retry mechanism uses exponential backoff to gradually increase wait times between attempts, reducing load on failing systems while still providing reasonable retry intervals for transient failures.
Classes
|
Configuration container for retry behavior. |
Functions
|
Decorator that adds automatic retry logic with exponential backoff. |
|
Functional interface for retrying a callable with arguments. |