Skip to main content

Module course_unit_poll_slots

Module course_unit_poll_slots 

Source
Expand description

When a partially registered row next looks for its course unit attainment. Sisu creates those in a nightly batch, so a row polls once after it, on the morning slot, and again on the noon slot if the morning poll came too early. A row that first shows its assessment item attainment during the day waits for the next morning.

Constants§

CATCH_UP_SLOT 🔒
Finnish wall-clock time of the catch-up poll for a row the morning poll missed.
MORNING_SLOT 🔒
Finnish wall-clock time of the daily poll, after Sisu’s nightly course unit batch.
SLOT_SPREAD
How long after its slot a poll may land, so the rows of one slot do not reach Suotar at once.

Functions§

next_course_unit_polls
The next course unit poll of each row, spread over the SLOT_SPREAD after its slot, in the order of first_seen_at: when a poll first saw the row’s assessment item attainment, or now for a row whose poll may see it now.
next_slots 🔒
Read off the database’s time zone data, which knows when Finland changes to and from summer time. Neither slot falls in the hour a change skips or repeats.