Merge "Add code tag for from_task_with_args() docstring"
This commit is contained in:
commit
7feaa881eb
|
@ -472,13 +472,14 @@ class PollingTaskGroup(object):
|
||||||
Each argument to use should be passed as a list (or iterable) of values
|
Each argument to use should be passed as a list (or iterable) of values
|
||||||
such that one is passed in the corresponding position for each subtask.
|
such that one is passed in the corresponding position for each subtask.
|
||||||
The number of subtasks spawned depends on the length of the argument
|
The number of subtasks spawned depends on the length of the argument
|
||||||
lists. For example:
|
lists.
|
||||||
|
For example::
|
||||||
|
|
||||||
PollingTaskGroup.from_task_with_args(my_task,
|
PollingTaskGroup.from_task_with_args(my_task,
|
||||||
[1, 2, 3],
|
[1, 2, 3],
|
||||||
alpha=['a', 'b', 'c'])
|
alpha=['a', 'b', 'c'])
|
||||||
|
|
||||||
will start three TaskRunners that will run:
|
will start three TaskRunners that will run::
|
||||||
|
|
||||||
my_task(1, alpha='a')
|
my_task(1, alpha='a')
|
||||||
my_task(2, alpha='b')
|
my_task(2, alpha='b')
|
||||||
|
|
Loading…
Reference in New Issue