pub enum HeartbeatNote {
Reported {
payload: Payload,
reported_at: DateTime<Utc>,
},
NoneSent,
Unavailable {
notes_held_since: DateTime<Utc>,
restarted_since_attempt_began: bool,
},
}Expand description
The most recent progress note the worker serving an attempt has reported — or a typed statement of why there is none.
Notes are VOLATILE. They live in the server process’s per-attempt
liveness state and are never written to the store, so a restart loses every
note ever reported. That is why absence has two forms and they are never
collapsed: Self::NoneSent is a measurement (this process is holding the
attempt and nothing has been reported on it), while Self::Unavailable is
the absence of a measurement (this process does not hold the attempt, so it
cannot say what was reported).
Variants§
Reported
The worker serving this attempt reported this note.
Fields
NoneSent
This server process holds the attempt’s liveness entry and no note has been reported on it. The worker really has said nothing.
This server process does not hold the attempt’s liveness entry, so it cannot say whether a note was reported.
The usual cause is a restart: notes began being held at
notes_held_since, and an attempt dispatched before that instant left
its notes in a process that no longer exists —
restarted_since_attempt_began says so outright. The other causes (the
attempt was swept off the tracker with its owner, or it has not been
leased) are equally unmeasurable here, and every one of them is reported
as this variant rather than as silence.
Trait Implementations§
Source§impl Clone for HeartbeatNote
impl Clone for HeartbeatNote
Source§fn clone(&self) -> HeartbeatNote
fn clone(&self) -> HeartbeatNote
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 HeartbeatNote
impl Debug for HeartbeatNote
Source§impl<'de> Deserialize<'de> for HeartbeatNote
impl<'de> Deserialize<'de> for HeartbeatNote
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>,
Source§impl PartialEq for HeartbeatNote
impl PartialEq for HeartbeatNote
Source§impl Serialize for HeartbeatNote
impl Serialize for HeartbeatNote
impl StructuralPartialEq for HeartbeatNote
Source§impl TS for HeartbeatNote
impl TS for HeartbeatNote
Source§type WithoutGenerics = HeartbeatNote
type WithoutGenerics = HeartbeatNote
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = HeartbeatNote
type OptionInnerType = HeartbeatNote
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read more