Reintentos¶
Política de reintentos aplicada por AlegraClient. Ver también la guía de
reintentos automáticos.
alegrapy.retry.RetryPolicy
dataclass
¶
How many times and how long to wait before retrying a failed request.
Attributes:
| Name | Type | Description |
|---|---|---|
max_retries |
int
|
Extra attempts after the first one; |
backoff_factor |
float
|
Base delay in seconds for exponential backoff. |
backoff_max |
float
|
Upper bound for a computed backoff delay, in seconds. |
retry_statuses |
frozenset[int]
|
HTTP statuses retried for idempotent methods. 500 is not included by default because on Alegra it usually means the payload was rejected. |
max_retry_after |
float
|
Longest |
__post_init__()
¶
Validate the policy values.
Raises:
| Type | Description |
|---|---|
ValueError
|
If a value is negative (or |