Skip to main content

write_schedule

Function write_schedule 

Source
async fn write_schedule(
    conn: &mut PgConnection,
    id: Uuid,
    group: EnrolmentCheckGroup,
    anchor_at: DateTime<Utc>,
    scheduled: Option<ScheduledEnrolmentCheck>,
    source: EnrolmentCheckSource,
    next_attempt_at: DateTime<Utc>,
    replaces_next_attempt: bool,
) -> ModelResult<()>
Expand description

Writes a (re)started or advanced schedule. next_attempt_at is only moved for a row parked in no_usable_enrolment, and only ever earlier unless replaces_next_attempt: a row in a resolve state has a check on its way already, and one a roster just woke must stay woken.