This document describes an older version of Celery (2.2). For the latest stable version please go here.
A task containing several subtasks, making it possible to track how many, or when all of the tasks have been completed.
Parameters: | tasks – A list of subtask instances. |
---|
Example:
>>> urls = ("http://cnn.com/rss", "http://bbc.co.uk/rss")
>>> taskset = TaskSet(refresh_feed.subtask((url, )) for url in urls)
>>> taskset_result = taskset.apply_async()
>>> list_of_return_values = taskset_result.join() # *expensive*
Applies the taskset locally by blocking until all tasks return.
Apply taskset.
Total number of subtasks in this set.
Class that wraps the arguments and execution options for a single task invocation.
Used as the parts in a TaskSet or to safely pass tasks around as callbacks.
Parameters: |
|
---|
Note that if the first argument is a dict, the other arguments will be ignored and the values in the dict will be used instead.
>>> s = subtask("tasks.add", args=(2, 2))
>>> subtask(s)
{"task": "tasks.add", args=(2, 2), kwargs={}, options={}}
Apply this task locally.
Apply this task asynchronously.
Shortcut to apply_async(argmerge, kwargs).