Skip to main content

Module enrolment_check_schedule

Module enrolment_check_schedule 

Source
Expand description

When a row waiting for an enrolment is checked next.

Each group has a ladder of offsets from its anchor. The next check is always the first rung after now, so a row that missed rungs (an outage, a check brought forward) gets one catch-up check rather than one per missed rung, and a row past its last rung has stopped.

Structs§

ScheduledEnrolmentCheck
One rung of a ladder, resolved against an anchor.

Enums§

EnrolmentCheckGroup
How strongly a student has signalled that they are enrolling, which picks the ladder. Ordered: a row only ever moves to a later variant.
EnrolmentCheckSource
What made an enrolment check run when it did.

Constants§

BATCH_INTERVAL
Slow checks go out together on boundaries this far apart.
BATCH_PULL_FORWARD
A slow check due this soon after a batch goes out joins it.
CHECK_REQUEST_MIN_INTERVAL
How soon after a check request, or after the last check, another request may start one. Shared by the student’s recheck, Done and the teacher’s button.
CHECK_REQUEST_RESTART_WINDOW
MAX_CHECK_REQUEST_RESTARTS_PER_DAY
How many check requests a day may restart the ladder. Past it a request gets one check only.
REGISTRY_LAG
Suotar’s copy of Sisu shows a new enrolment after 15 to 60 minutes, so a check sooner than this after an enrolment usually cannot see it.
SLOW_GAP 🔒
A rung at least this far after the one before it is a slow one.
STUDENT_CHECK_REQUEST_MIN_ROW_AGE
How old a row must be before its student may ask for a check: a new enrolment takes 15 to 60 minutes to show, so an earlier request only finds nothing and spends the allowance.
TRANSIENT_FAILURE_RETRY
How long a check that failed in transit waits before the same rung is tried again.
VISIT_RESTART_MIN_INTERVAL
A repeat visit restarts the visited ladder at most this often.

Functions§

extend_by 🔒
Appends rungs gap apart until the next one would pass until.
first_check
The first rung of a ladder started at anchor. A check request’s own check runs before it, at once.
ladder_offsets 🔒
The group’s ladder, as offsets from the anchor, ascending.
never
Where a stopped row’s next_attempt_at is parked: it is never claimed on its own again.
next_check_after
The first rung strictly after after, or None once the ladder has run out.
push_after 🔒
resolve 🔒