pub async fn get_unmaterialised_eligible_completions(
conn: &mut PgConnection,
min_age_secs: i64,
limit: i64,
) -> ModelResult<Vec<UnmaterialisedCompletion>>Expand description
Completions ensure_registration_rows_for_eligible_completions should have picked up at least
min_age_secs ago and did not.
The materialise statement’s own view, minus its enrolment join, which is reported per row instead: a completion whose enrolment was removed is invisible to materialise and would otherwise look like a lost row forever. Returns one row over the limit where there are more, so a caller can say so without a second count.