pub async fn claim_due_for_resolve(
conn: &mut PgConnection,
scope: &RegistrationScope,
limit: i64,
) -> ModelResult<Vec<CreditRegistration>>Expand description
Claims, for resolve-enrolments, ready_to_submit rows and parked rows due an enrolment check,
the later EnrolmentCheckGroup first, minus any whose student already has another live row
for the module somewhere between resolving and a known outcome. First pulls slow checks due soon
into the batch; see
crate::library::credit_registration::enrolment_checks::pull_forward_batched_checks.
Only one completion per student and module goes past resolve at a time, so each is weighed
against the outcome of the one before it rather than racing it to the registry; see
lock_live_successes_for_same_module. Of two such
rows claimed together only the first comes back; the other stays claimable where it is. A parked
row sent for a check must be marked with claim_enrolment_checks before the claim’s
transaction commits.