Skip to main content

Module schedule

Module schedule 

Source
Expand description

Pure refresh-scheduling decisions: given each external-sourced measure’s RefreshPolicy and when it last ran, decide which measures are due to refresh now. This is intentionally I/O-free and clock-free (times are plain seconds) so a daemon can drive it and tests can exercise it deterministically. The daemon (CLI serve-refresh) does the actual query/eval; this only picks what and when.

Functions§

due_measures
Return the ids of every measure whose policy makes it due at now_secs, given the policy per measure and the last run time per measure. Ids are returned sorted for determinism.
is_due
Decide whether a single measure is due to refresh.