Skip to main content

pull_forward_batched_checks

Function pull_forward_batched_checks 

Source
pub async fn pull_forward_batched_checks(
    conn: &mut PgConnection,
    scope: &RegistrationScope,
) -> ModelResult<()>
Expand description

Brings the slow checks due within BATCH_PULL_FORWARD forward to now when another slow check in scope is released and not yet claimed: they cost nothing extra in the request that goes out for it. A row tried within TRANSIENT_FAILURE_RETRY keeps waiting out its failed lookup.

Its test for a released check shares its filters with the claim behind claim_due_for_resolve and with count_due_enrolment_checks; change all three together.