dootle.actions.postbox
Postbox: Each Task Tree gets one, as a set[Any] Each Task can put something in its own postbox. And can read any other task tree’s postbox, but not modify it.
Functions
|
Validate and split a key into (box, subbox) |
Classes
Internal Postbox class. |
|
push data to the inter-task postbox of this task tree |
|
Read data from the inter-task postbox of a task tree. |
|
Clear your postbox |
|
print a summary of this task tree's postbox |
Module Contents
- dootle.actions.postbox._validate_key(
- key: doot.workflow.TaskName,
Validate and split a key into (box, subbox)
- class dootle.actions.postbox._DootPostBox
Internal Postbox class. holds a static variable of boxes, which maps task roots -> unique postbox Postboxes are lists, values are appended to it
Can ‘put’, ‘get’, ‘clear_box’, and ‘clear’.
Keys are task names, of {body}..{tail} eg: example::task..key which corresponds to body[example::task][key]
- Subboxes: TypeAlias = dict[str, list[Any]]
- Boxes: TypeAlias = dict[str, Subboxes]
- boxes: ClassVar[_DootPostBox.Boxes]
- class dootle.actions.postbox.PutPostAction
push data to the inter-task postbox of this task tree ‘args’ are pushed to the postbox of the calling task root (ie: stripped of UUIDs) ‘kwargs’ are pushed to the kwarg specific subbox. can be explicit tasks or a subbox of the calling task root
Both key and value are expanded of kwargs. The Subbox is the last ..{name} of the full path
eg: {do=”post.put”, args=[“{key}”, “{key}”], “group::task.sub..subbox”=”{key}”, “subbox”=”{key2}”}
- class dootle.actions.postbox.GetPostAction
Read data from the inter-task postbox of a task tree. ‘args’ pop a value from the calling tasks root (ie: no UUIDs) box into that key name ‘kwargs’ are read literally
stateKey=”group::task.sub..{subbox}” eg: {do=’post.get’, args=[“first”, “second”, “third”], data=”bib::format..-“}
- class dootle.actions.postbox.ClearPostAction
Clear your postbox
- class dootle.actions.postbox.SummarizePostAction
print a summary of this task tree’s postbox The arguments of the action are held in self.spec