Skip to main content

add_to_all_to_chord

Iterates through a list of numbers and adds a task to the current chord for each number, applying an addition operation with a specified value.

def add_to_all_to_chord(
self: Task,
nums: iterable,
val: number
) - > int

Iterates through a collection of numbers and adds a Celery task to the current chord for each number incremented by a specific value.

Parameters

NameTypeDescription
selfTaskThe Celery task instance, providing access to the chord manipulation methods via the bind=True decorator.
numsiterableA collection of numeric values to be processed individually.
valnumberThe constant value to be added to each number in the nums collection during task execution.

Returns

TypeDescription
intReturns a constant value of 0 upon successful scheduling of the tasks.