Retry
The task is to be retried later.
Attributes
| Attribute | Type | Description |
|---|---|---|
| message | string = None | Optional message describing context of retry. |
| exc | Exception = None | Exception (if any) that caused the retry to happen. |
| when | `numbers.Real | datetime.datetime` = None |
Constructor
Signature
def Retry(
message: string = None,
exc: Exception|string = None,
when: numbers.Real|datetime.datetime = None,
is_eager: boolean = False,
sig: [Signature](../canvas/signature.md?sid=celery_canvas_signature) = None,
**kwargs: dict
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| message | string = None | Optional message describing the context of the retry. |
| exc | `Exception | string` = None |
| when | `numbers.Real | datetime.datetime` = None |
| is_eager | boolean = False | Flag indicating if the task is being executed eagerly. |
| sig | [Signature](../canvas/signature.md?sid=celery_canvas_signature) = None | The signature of the task being retried. |
| **kwargs | dict | Additional keyword arguments passed to the parent TaskPredicate class. |
Methods
humanize()
@classmethod
def humanize() - > string
Converts the retry schedule into a human-readable string format. Returns a relative time string if the schedule is a number, or an absolute time string otherwise.
Returns
| Type | Description |
|---|---|
string | A string describing the retry time, formatted as either 'in [seconds]s' or 'at [timestamp]' |