Skip to content

Latest commit

 

History

History
70 lines (39 loc) · 4.22 KB

File metadata and controls

70 lines (39 loc) · 4.22 KB
graph LR
    Retry_Decorator_Interface["Retry Decorator Interface"]
    Retry_Orchestrator["Retry Orchestrator"]
    Attempt_Context["Attempt Context"]
    Retry_Strategy_Implementations["Retry Strategy Implementations"]
    Retry_Exception["Retry Exception"]
    Retry_Decorator_Interface -- "configures" --> Retry_Orchestrator
    Retry_Orchestrator -- "manages" --> Attempt_Context
    Retry_Orchestrator -- "evaluates" --> Retry_Strategy_Implementations
    Retry_Orchestrator -- "applies" --> Retry_Strategy_Implementations
    Retry_Orchestrator -- "raises" --> Retry_Exception
    click Retry_Decorator_Interface href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/retrying/Retry_Decorator_Interface.md" "Details"
    click Retry_Orchestrator href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/retrying/Retry_Orchestrator.md" "Details"
Loading

CodeBoardingDemoContact

Details

The retrying library provides a robust mechanism for adding retry logic to Python functions. At its core, the Retry Decorator Interface serves as the primary entry point, allowing developers to easily configure retry behavior for their functions. This decorator, in turn, configures the Retry Orchestrator, which is the central component responsible for managing the entire retry lifecycle. The Retry Orchestrator manages the Attempt Context, which encapsulates the state of each individual function execution attempt. During the retry process, the Orchestrator evaluates various Retry Strategy Implementations (e.g., stop conditions, retry conditions) to determine if another attempt is warranted. If so, it applies other Retry Strategy Implementations (e.g., wait intervals) before the next attempt. Should all retry attempts be exhausted without success, the Retry Orchestrator raises a Retry Exception, signaling the ultimate failure of the decorated operation. This modular design ensures clear separation of concerns, making the retry mechanism flexible and extensible.

Retry Decorator Interface [Expand]

The public API for applying retry logic to functions. It acts as the entry point for users to configure retry behavior.

Related Classes/Methods:

Retry Orchestrator [Expand]

The central engine that manages the entire retry lifecycle, including the retry loop, function invocation, and application of strategies.

Related Classes/Methods:

Attempt Context

A data structure that encapsulates the state of a single execution attempt of the decorated function.

Related Classes/Methods:

Retry Strategy Implementations

A collection of pluggable components that define the conditions for stopping retries, the duration of pauses between retries, and the criteria for triggering a retry.

Related Classes/Methods:

Retry Exception

A custom exception raised when all retry attempts have been exhausted and the decorated function still fails.

Related Classes/Methods: