pub async fn recompute_preconditions(
conn: &mut PgConnection,
scope: &RegistrationScope,
limit: i64,
) -> ModelResult<i64>Expand description
Applies at most limit moves to the scoped rows and returns how many moved.
A row a worker claimed between the snapshot and the write is left where it is: its state is that phase’s to own now, and the next iteration decides again from whatever it committed. Writing anyway could put an in-flight import back into a state a second import claims.
A row that would start resolving without ever having been checked starts its enrolment check
schedule instead: nobody has enrolled at the moment they complete, so it waits in
no_usable_enrolment for the first rung of its group’s ladder unless that rung is due already.
A row waiting there is left to resolve-enrolments, which checks it where it stands.