pub enum NodeStatus {
Inactive,
Pending,
Running,
Completed,
Waiting,
Failed,
Cancelled,
}Expand description
The lifecycle status of a node in the workflow graph.
The status is the engine’s single source of truth for what a node is doing. It mediates between the trigger buffer (what wants to run), the in-process task table (what is currently running), and the persisted node history (what has run).
Variants§
Inactive
The node has not been touched yet. This is the zero value.
Pending
The node is ready to run. It may be queued because its input has arrived (consumed from the trigger buffer) or because it is being retried after a failure. The scheduler may keep a pending node from starting if the engine’s max-concurrency cap is reached.
Running
The engine has started a task for this node. The task is in flight in the current process. A running entry that has no live task in the run state (e.g. after a process restart) must be re-scheduled.
Completed
The node finished and produced its output. This is a terminal status for normal execution, but a completed node may still be re-triggered by a fresh entry in the trigger buffer (this is what enables loops as graph cycles).
Waiting
The node is paused. Two cases share this status: human-in-the-loop (the node yielded a
RequestInput and is blocked until a function-response payload resumes it), and fan-in
(wait_for_output, e.g. JoinNode: the node ran but did not yet produce its final output
because not all predecessors have triggered it). While any node is waiting the workflow
does not finalize.
Failed
The node returned an error and the retry policy (if any) has been exhausted. Terminal.
Cancelled
The node was cancelled: either because a sibling node failed and the engine cancelled all running tasks, or because the invocation was cancelled from outside the engine. Terminal in both cases — the two are told apart by whether the run reports an error, not by this status.
Trait Implementations§
Source§impl Clone for NodeStatus
impl Clone for NodeStatus
impl Copy for NodeStatus
Source§impl Debug for NodeStatus
impl Debug for NodeStatus
Source§impl Default for NodeStatus
impl Default for NodeStatus
impl Eq for NodeStatus
Source§impl PartialEq for NodeStatus
impl PartialEq for NodeStatus
impl StructuralPartialEq for NodeStatus
Auto Trait Implementations§
impl Forget for NodeStatus
impl Freeze for NodeStatus
impl Move for NodeStatus
impl RefUnwindSafe for NodeStatus
impl Send for NodeStatus
impl Sync for NodeStatus
impl Unpin for NodeStatus
impl UnsafeUnpin for NodeStatus
impl UnwindSafe for NodeStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.