Skip to main content

Module credit_registration_phase_state

Module credit_registration_phase_state 

Source
Expand description

Per-phase heartbeat and control for the credit registration pipeline.

One row per phase, seeded by migration and thereafter only ever updated.

Structs§

CreditRegistrationPhaseState
PhaseRunOutcome
What one iteration of a phase did, as its phase-state row records it.

Constants§

PHASES
Canonical phase names, used verbatim as the phase value, in the test tick endpoint, the dashboard and the audit log.

Functions§

get_all
get_by_phase
heartbeat
Written every iteration, work or not, so idle and wedged stay distinguishable.
is_paused
keep_alive
Keeps a long iteration from reading as a dead worker; unlike heartbeat, leaves last_run_started_at at the iteration’s start.
pause
record_run
Closes out an iteration. Only a success moves last_success_at, so a wedged phase stays distinguishable from a quiet one.
resume
run_now
Makes the phase due now; the phase loop picks it up on its next next_run_at check.
set_next_run_at