Skip to main content

queue_overviews

Function queue_overviews 

Source
pub async fn queue_overviews(
    pool: &PgPool,
) -> Result<Vec<QueueOverview>, AwaError>
Expand description

Get queue overviews for all known queues.

Hybrid read: per-state counts come from the queue_state_counts cache table (eventually consistent, ~2s lag), while lag_seconds and completed_last_hour are computed live from jobs_hot.

The cache is kept fresh by the maintenance leader’s dirty-key recompute (~2s) and full reconciliation (~60s). Also warmed during migrate().

For exact cached counts in tests without a running maintenance leader, call flush_dirty_admin_metadata() first.