pub async fn claim_unnotified(
conn: &mut PgConnection,
scope: &RegistrationScope,
limit: i64,
) -> ModelResult<Vec<StudentNotificationToQueue>>Expand description
Claims the rows owed a mail, locking them until the caller’s transaction ends, so callers must
pass a transaction. Never claims cancelled, blocked or any failure state: those get
nothing. Nor a duplicate or not_improved row whose student already has, or is owed, the
registered mail for another row of the module.