pub enum LeanWorkerRestartReason {
Explicit,
MaxRequests {
limit: u64,
},
MaxImports {
limit: u64,
},
RssCeiling {
current_kib: u64,
limit_kib: u64,
last_import_stats: Option<LeanWorkerImportStats>,
},
RssHardLimit {
operation: &'static str,
current_kib: u64,
limit_kib: u64,
last_import_stats: Option<LeanWorkerImportStats>,
},
Idle {
idle_for: Duration,
limit: Duration,
},
Cancelled {
operation: &'static str,
},
RequestTimeout {
operation: &'static str,
duration: Duration,
},
ChildAbort {
operation: &'static str,
},
}Expand description
Reason recorded for the latest worker cycle.
Variants§
Explicit
The caller explicitly requested a process cycle.
MaxRequests
Request count reached the configured limit before the next request.
MaxImports
Import-like request count reached the configured limit before the next import.
RssCeiling
Child resident set size reached the configured limit.
RssHardLimit
Child resident set size crossed the hard in-flight kill limit.
Fields
last_import_stats: Option<LeanWorkerImportStats>Idle
Worker was idle at least as long as the configured limit.
Cancelled
Parent-side cancellation replaced the child during an in-flight request.
RequestTimeout
Parent-side request timeout replaced the child during an in-flight request.
ChildAbort
The child aborted (SIGABRT / fatal panic) during an in-flight request and the supervisor respawned it. Used by the read-only verify/proof-state guard that converts such an abort into a degraded verdict instead of a hard error.
Implementations§
Source§impl LeanWorkerRestartReason
impl LeanWorkerRestartReason
Sourcepub const fn stable_cause(&self) -> &'static str
pub const fn stable_cause(&self) -> &'static str
Stable wire/policy cause name for this restart reason.
This is intentionally smaller than the full enum payload: callers can branch on the cause while still using the typed enum when they need details such as limits or durations.
Trait Implementations§
Source§impl Clone for LeanWorkerRestartReason
impl Clone for LeanWorkerRestartReason
Source§fn clone(&self) -> LeanWorkerRestartReason
fn clone(&self) -> LeanWorkerRestartReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LeanWorkerRestartReason
impl Debug for LeanWorkerRestartReason
impl Eq for LeanWorkerRestartReason
Source§impl PartialEq for LeanWorkerRestartReason
impl PartialEq for LeanWorkerRestartReason
Source§fn eq(&self, other: &LeanWorkerRestartReason) -> bool
fn eq(&self, other: &LeanWorkerRestartReason) -> bool
self and other values to be equal, and is used by ==.