pub fn count_recent_with_status(
connection: &mut PgConnection,
status: &str,
hours: i64,
) -> usizeExpand description
Counts jobs in terminal status created within the last hours — a current-state observability
signal for “are jobs failing / stalling lately?”. A rolling window so the gauge
auto-resolves (unlike an ever-growing total-failures counter, which would alert forever after
one failure). Skew-free (windowed against the DB clock). Best-effort: 0 on error.