Skip to content
PACKAGES

RetryPolicy

Kind: class

Source: src/graphrefly/_modules.py:387

RetryPolicy(max_attempts: int = 1, initial_ms: float = 0, factor: float = 1, max_ms: float | None = None)

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.

NameTypeDescription
max_attemptsint
initial_msfloat
factorfloat
max_ms`floatNone`
waitsboolWhether a retry can wait, so that the graph needs a clock.
delay_after(failed_attempt: int) -> float | None

The 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() -> dict[str, object]

The policy as a recipe configuration.

Source: src/graphrefly/_modules.py:435