replace_with_chain_which_raises
Replaces the current task with a chain that executes an identity task followed by an error-raising task, optionally linking an error callback to a Redis echo signature.
def replace_with_chain_which_raises(
self: celery.app.task.Task,
*args: Any,
link_msg: Any = null
) - > celery.result.AsyncResult
Replaces the current task with a chain that executes an identity function followed by a task that raises an error, while optionally attaching an error callback.
Parameters
| Name | Type | Description |
|---|---|---|
| self | celery.app.task.Task | The task instance being replaced, provided by the @shared_task(bind=True) decorator. |
| *args | Any | Positional arguments passed to the initial identity task in the chain. |
| link_msg | Any = null | An optional message to be passed to the redis_echo error callback task if the chain fails. |
Returns
| Type | Description |
|---|---|
celery.result.AsyncResult | The result of the task replacement, representing the newly created chain execution. |