Skip to main content

schedule_next_check

Function schedule_next_check 

Source
pub async fn schedule_next_check(
    conn: &mut PgConnection,
    id: Uuid,
) -> ModelResult<()>
Expand description

Schedules the next check of a row an answer just parked in no_usable_enrolment: the first rung after now, or stopped once the ladder has run out. A row with no schedule yet, such as one import sent back, starts one now.

Reads the schedule under lock rather than from the snapshot the answer was decided on, so a request that restarted the row while the check was out is kept.