Skip to main content

count_pending

Function count_pending 

Source
pub async fn count_pending(pool: &PgPool) -> Result<i64, Error>
Expand description

Count of rows in status = 'pending' (any next_retry). Used by the delivery worker to publish a mailrs_outbound_queue_depth gauge per poll tick. O(rows) but cheap with the status index.