retry
Task simulating multiple retries.
When return_value is provided, the task after retries returns
the result. Otherwise it fails.
def retry(
self: Task,
return_value: any = None
) - > any
Task simulating multiple retries. When return_value is provided, the task after retries returns the result. Otherwise it fails.
Parameters
| Name | Type | Description |
|---|---|---|
| self | Task | The Celery task instance bound to the function, used to track retry attempts via state attributes. |
| return_value | any = None | The value to be returned upon successful completion of the retry cycle; if None, the task will continue to fail and retry. |
Returns
| Type | Description |
|---|---|
any | The provided return_value after the maximum number of retry attempts (3) has been reached. |