Reject
A task can raise this if it wants to reject/re-queue the message.
Attributes
| Attribute | Type | Description |
|---|---|---|
| reason | string | The explanation or cause for rejecting the task, used for logging and debugging purposes. |
| requeue | boolean | A boolean flag determining whether the rejected message should be placed back into the queue for retry. |
Constructor
Signature
def Reject(
reason: Any = None,
requeue: boolean = False
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| reason | Any = None | The reason for rejecting the message. |
| requeue | boolean = False | Whether the message should be re-queued. |
Signature
def Reject(
reason: string = None,
requeue: boolean = False
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| reason | string = None | The explanation or error message detailing why the task is being rejected. |
| requeue | boolean = False | A flag indicating whether the message should be returned to the queue for another worker to process. |