replace_with_empty_chain
Replaces the current task with an empty Celery chain.
def replace_with_empty_chain(
self: celery.app.task.Task,
*_: any
) - > celery.canvas.chain
Replaces the current Celery task with an empty chain, effectively halting further execution in the current workflow.
Parameters
| Name | Type | Description |
|---|---|---|
| self | celery.app.task.Task | The bound task instance used to access the replace method. |
| *_ | any | Variable positional arguments that are ignored by the function. |
Returns
| Type | Description |
|---|---|
celery.canvas.chain | An empty Celery chain object that replaces the existing task execution. |