pub enum Cause {
Dispatch,
Recovered(Recovery),
Steered(Steer),
Resumed(Resumption),
}Expand description
Why a run is being started.
Variants§
Dispatch
A flight arrived in the ordinary way.
Recovered(Recovery)
An earlier run was interrupted and the work is being restarted.
Steered(Steer)
A human redirected an earlier run.
Resumed(Resumption)
Work an earlier chain set down deliberately, now picked up again.
Distinct from Self::Recovered, and the difference matters to the agent reading it. A
recovered run is repeating work that may be half-done; a resumed layover is not. The
earlier run finished, having chosen to come back later, so nothing is half-applied and
the warning about doing things twice would be misleading here.
Implementations§
Source§impl Cause
impl Cause
Sourcepub fn repeats_earlier_work(&self) -> bool
pub fn repeats_earlier_work(&self) -> bool
Returns true when this run is repeating work an earlier one may have partly done.
The distinction matters to an agent: work already done may need checking before it is done again, and a side effect already applied must not be applied twice.
A resumed layover is deliberately not repeating work. The earlier run set it down on purpose and ended cleanly, so telling this one to check for half-applied side effects would send it looking for something that is not there.