RetryPolicy
RetryPolicy
Section titled “RetryPolicy”Kind: class
Source: src/graphrefly/_modules.py:387
Signature
Section titled “Signature”RetryPolicy(max_attempts: int = 1, initial_ms: float = 0, factor: float = 1, max_ms: float | None = None)Description
Section titled “Description”Whether and after what delay an ERROR is retried, within one round: attempt n’s
failure is retried after initial_ms * factor ** (n - 1) ms, at most max_ms, while
fewer than max_attempts attempts were made.
Attributes
Section titled “Attributes”| Name | Type | Description |
|---|---|---|
max_attempts | int | |
initial_ms | float | |
factor | float | |
max_ms | `float | None` |
waits | bool | Whether a retry can wait, so that the graph needs a clock. |
Methods
Section titled “Methods”delay_after
Section titled “delay_after”delay_after(failed_attempt: int) -> float | NoneThe delay before the next attempt after attempt failed_attempt failed, or
None when no attempt is left.
Source: src/graphrefly/_modules.py:415
to_json
Section titled “to_json”to_json() -> dict[str, object]The policy as a recipe configuration.
Source: src/graphrefly/_modules.py:435