pub struct WorkerExit {
pub code: Option<i32>,
pub signal: Option<i32>,
pub at: DateTime<Utc>,
}Expand description
The observed exit status of a node’s worker process, recorded by the
run-worker launcher shim under the run lock (design.md §2.1 / A1).
Exactly one of code / signal is meaningful: a worker that returned
normally carries code = Some(n) (and signal = None); a worker killed by a
signal carries signal = Some(s) (and, on Unix, code = None). A recorded
exit is a durable told fact — the supervisor reads it rather than inferring
completion from liveness proxies.
Fields§
§code: Option<i32>Normal-exit status code, if the worker was not killed by a signal.
signal: Option<i32>Terminating signal number, if the worker was killed by a signal.
at: DateTime<Utc>When the shim observed the worker’s exit.
Implementations§
Source§impl WorkerExit
impl WorkerExit
Sourcepub fn is_clean(self) -> bool
pub fn is_clean(self) -> bool
A clean exit: not signalled, and a zero return code. This is the only
success-shaped worker exit — but a clean exit alone is NOT a completed
unit (the worker may have finished-but-skipped run merge); merge is the
only success truth (design.md §2.6). Callers pair this with a merge check.
Sourcepub fn is_failure(self) -> bool
pub fn is_failure(self) -> bool
A failed worker: killed by a signal, or a non-zero return code. Mutually
exclusive with WorkerExit::is_clean.
Trait Implementations§
Source§impl Clone for WorkerExit
impl Clone for WorkerExit
Source§fn clone(&self) -> WorkerExit
fn clone(&self) -> WorkerExit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more