diff --git a/src/aact/nodes/base.py b/src/aact/nodes/base.py index fd06847..06222df 100644 --- a/src/aact/nodes/base.py +++ b/src/aact/nodes/base.py @@ -132,6 +132,19 @@ async def __aexit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None [^1]: Only if you know what you are doing. For example, in the `aact.nodes.record.RecordNode`, the `InputType` is `aact.messages.DataModel` because it can accept any type of message. But in most cases, you should specify the `InputType` and `OutputType` to be a specific subclass of `aact.messages.DataModel`. + + ### Shutdown nodes + + The default method for stopping nodes is through shutting down the subprocesses or RQ jobs. When you want to bring + down the dataflow, you can `Ctrl + c` to turn off the nodes gracefully. + + To shutdown a node itself, you can return from its event loop programatically when a certain condition is reached. + + #### Experimental feature: Peer-stopping + + An experimental feature is peer-stopping. A node can not only stop itself but also other nodes. To do this, send + a message to the channel `f"shutdown:{self.node_name}"` and the node manager will shutdown all of the nodes in the + current dataflow. """ input_channel_types: dict[str, Type[InputType]]