collect_ids
Used as a callback in a chain or group where the previous tasks are :task:ids: returns a tuple of::
(previous_result, (root_id, parent_id, i))
def collect_ids(
self: celery.app.task.Task,
res: Any,
i: int
) - > tuple
Used as a callback in a chain or group where the previous tasks are :task:ids: returns a tuple of:: (previous_result, (root_id, parent_id, i))
Parameters
| Name | Type | Description |
|---|---|---|
| self | celery.app.task.Task | The task instance automatically bound to the function by the @shared_task decorator. |
| res | Any | The result passed from the previous task in the Celery chain or group. |
| i | int | An index or identifier used to track the specific task's position or sequence. |
Returns
| Type | Description |
|---|---|
tuple | A nested tuple containing the previous task's result and a sub-tuple of the current task's root ID, parent ID, and the provided index. |