Skip to main content

claim_due

Function claim_due 

Source
pub async fn claim_due(
    conn: &mut PgConnection,
    states: &[CreditRegistrationState],
    limit: i64,
) -> ModelResult<Vec<CreditRegistration>>
Expand description

Claims up to limit due rows in the given states for this worker.

The SKIP LOCKED row locks live until the caller’s transaction ends, so callers must pass a transaction. Rows on a paused course module are never claimed, enforced here so no phase can forget it.