retry_once
Task that fails and is retried. Returns the number of retries.
def retry_once(
self: Task,
*args: any,
expires: float,
max_retries: integer,
countdown: float
) - > integer
Task that fails and is retried. Returns the number of retries.
Parameters
| Name | Type | Description |
|---|---|---|
| self | Task | The Celery task instance bound to the function |
| *args | any | Variable positional arguments passed to the task |
| expires | float | The expiration time in seconds for the retried task instance |
| max_retries | integer | The maximum number of times the task should be retried before failing permanently |
| countdown | float | The delay in seconds to wait before executing the retried task |
Returns
| Type | Description |
|---|---|
integer | The current number of retries performed by the task instance |