Task¶
- class caliber.Task(function: Callable | None = None, name: str | None = None, args: List | None = None, kwargs: Dict | None = None)[source]¶
A task which can be part of a process.
- Parameters:
function (function) – The function that will be run by the task.
name (str) – The name of the task.
args (list) – The positional arguments of function. If the task is part of a BranchProcess, args should be a list of lists.
kwargs (dict) – The keyword arguments of the function. If the task is part of a BranchProcess, kwargs should be a list of dicts.
- run()[source]¶
Run the function referred to by the Task object.
- Returns:
The return of the function referred to by the Task object.