doot.workflow.task
A Utility implementation of most of what a task needs
Classes
The simplest task, which can import action classes. |
Module Contents
- class doot.workflow.task._TaskProperties_m[source]
- class doot.workflow.task._TaskStubbing_m[source]
- class doot.workflow.task.DootTask(
- spec: doot.workflow._interface.TaskSpec_i,
- *,
- action_ctor: jgdv.Maybe[collections.abc.Callable] = None,
- **kwargs: Any,
The simplest task, which can import action classes. eg: actions = [ {do = “doot.workflow.actions.shell_action:DootShellAction”, args = [“echo”, “this is a test”] } ]
Actions are imported upon task creation.
- Parameters:
action_ctor (jgdv.Maybe[collections.abc.Callable])
kwargs (Any)
- Flags: ClassVar[type[doot.workflow._interface.TaskMeta_e]]
- INITIAL_STATE: ClassVar[doot.workflow._interface.TaskStatus_e]
- COMPLETE_STATES: ClassVar[set[doot.workflow._interface.TaskStatus_e]]
- _default_flags: ClassVar
- flags
- _spec
- _priority
- _status
- property name: doot.workflow._interface.TaskName_p[source]
- Return type:
- property spec: doot.workflow._interface.TaskSpec_i[source]
- Return type:
- property status: doot.workflow._interface.TaskStatus_e[source]
- Return type:
- prepare_actions() None[source]
- if the task/action spec requires particular action ctors, load them.
if the action spec doesn’t have a ctor, use the task’s action_ctor
collects any action errors together, then raises them as a task error
- Return type:
None