quickie.group
- quickie.group(fn: Callable) type[Group]
- quickie.group(*, name: str | None = None, extra_args: bool | None = False, bind: bool = False, condition: BaseCondition | None = None, before: Sequence[Any] | None = None, after: Sequence[Any] | None = None, cleanup: Sequence[Any] | None = None) PartialReturnType[Group]
Create a group task from a function.
The returned task will run in the same order without extra arguments. To add arguments to individual tasks in the group, you can use
partial_task().@group @arg("arg1") def my_group(arg1): return [task1, partial_task(task2, arg1)]
- Parameters:
fn – The function to create the group task from.
name – The name of the group task.
extra_args – If the group task accepts extra arguments.
bind – If true, the first parameter of the function will be the task class instance.
condition – The condition to check before running the group task.
before – The tasks to run before the group task.
after – The tasks to run after the group task.
cleanup – The tasks to run after the group task, even if it fails.
- Returns:
The group task class, or, if fn is None, a partial function to be used as a decorator for a function.