pub struct CarriedWorker {
pub id: String,
pub subagent_id: u64,
pub agent: String,
pub status: String,
pub archive_path: Option<PathBuf>,
pub stopped_by_reload: bool,
pub wake_lost: bool,
pub wake: bool,
pub elapsed_secs: u64,
pub preview: String,
}Expand description
A worker carried across a daemon reload (ReloadSession::workers).
A reload execvs the daemon: worker threads cannot survive it. So the
checkpoint stops every running worker (its archive is the resumable
state), and the new image re-registers each id against its archive and
tells the parent, which would otherwise wait for a completion that never
comes.
Fields§
§id: String§subagent_id: u64§agent: String§status: Stringrunning never appears: the checkpoint has stopped them.
archive_path: Option<PathBuf>The resume archive, when the worker’s finalizer wrote one.
stopped_by_reload: boolA daemon reload (this one or an earlier one) stopped this run, not
the user. A label for status and the wake’s wording; whether the
parent is told again is Self::wake.
wake_lost: boolFinished on its own, and its completion wake never reached the parent: still queued in the old image’s event queue (which the exec discards), or not yet pushed when the checkpoint ended.
wake: boolThe next image must wake the parent about this worker: this reload stopped it, its completion wake was lost, or the reload wake an earlier image posted is still undelivered. Exactly once per stop: a later reload does not repeat a delivered wake.
elapsed_secs: u64§preview: StringLatest words of the worker (≤ 300 chars), for the wake preview.
Implementations§
Source§impl CarriedWorker
impl CarriedWorker
Sourcepub fn needs_wake(&self) -> bool
pub fn needs_wake(&self) -> bool
Whether the parent must be woken about this worker after the reload.
Trait Implementations§
Source§impl Clone for CarriedWorker
impl Clone for CarriedWorker
Source§impl Debug for CarriedWorker
impl Debug for CarriedWorker
Source§impl<'de> Deserialize<'de> for CarriedWorker
impl<'de> Deserialize<'de> for CarriedWorker
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for CarriedWorker
Source§impl PartialEq for CarriedWorker
impl PartialEq for CarriedWorker
Source§impl Serialize for CarriedWorker
impl Serialize for CarriedWorker
impl StructuralPartialEq for CarriedWorker
Auto Trait Implementations§
impl Freeze for CarriedWorker
impl RefUnwindSafe for CarriedWorker
impl Send for CarriedWorker
impl Sync for CarriedWorker
impl Unpin for CarriedWorker
impl UnsafeUnpin for CarriedWorker
impl UnwindSafe for CarriedWorker
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.