Skip to main content

is_phase_failing

Function is_phase_failing 

Source
pub(crate) fn is_phase_failing(
    phase: &CreditRegistrationPhaseState,
    now: DateTime<Utc>,
    depth_of: impl Fn(CreditRegistrationState) -> i64,
    due_enrolment_checks: i64,
) -> bool
Expand description

Whether a phase counts as failing: too many failures in a row, or a nonempty queue with no success for too long, or an iteration hung past that same bound. Never while paused. The one definition behind both the PhaseFailing alert and the Workers tab’s failing flag.

depth_of is the live count of a state; due_enrolment_checks as for CreditRegistrationPhase::queue_depth.