replace_with_stamped_task
Replaces the current task with a new task signature, defaulting to a 'replaced_with_me' signature if no replacement is provided.
def replace_with_stamped_task(
self: StampedTaskOnReplace,
replace_with: signature | None = None
) - > null
Replaces the current task execution with a new task signature, effectively handing off the execution flow to the specified task.
Parameters
| Name | Type | Description |
|---|---|---|
| self | StampedTaskOnReplace | The instance of the task being executed, providing access to the replacement logic. |
| replace_with | `signature | None` = None |
Returns
| Type | Description |
|---|---|
null | This method does not return a value as it triggers a task replacement within the Celery worker. |