Skip to main content

Module row_writes

Module row_writes 

Source
Expand description

Writes to a row’s fields other than its state, which only transition writes: the frozen payload, what the study registry answered, the schedule, the counters and the flags.

Structs§

PayloadSnapshot
Frozen copy of what we are about to submit. Written once, before the row leaves checking_enrolment: a later regrade must not alter a submitted row.

Functions§

increment_submit_retry_count
increment_verify_attempt_counts
Counts one verify poll for every row of a batch and returns each row’s new count, which sets the backoff the poll’s answer is scheduled by.
make_due_now_batch
Makes rows claimable again now, whatever backoff parked them. A row waiting for an enrolment check has its check marked as enrolment_check_source: who asked for it.
mark_improvement_checked
Records that the grade-improvement scan looked at this accepted attempt against a completion in the given revision and found nothing better.
mark_partially_registered
Notes that verify saw only the assessment item attainment, keeping the first sighting, and returns when that was.
mark_pending_superseded
Marks a registered row as being replaced by superseded_by_id, a later attempt with a better grade, of the same completion or another, which takes over the row’s slot in uq_credit_registrations_person_module.
mark_superseded
Points an old attempt at the newer one that replaced it. The old row keeps its state and terminal_at: it really was registered.
requeue_retryable_now
Makes every due-later failed_retryable row due now; returns how many. The button pressed once the study registry says an outage is over.
reset_for_resubmission
Forgets a submission Suotar says never landed, so the row resolves its enrolment and imports again from scratch, and returns how many times that has now happened.
restamp_resolving_enrolment
Restarts the recovery grace of rows waiting out an enrolment lookup in resolving_enrolment, which runs from state_entered_at, for a split batch whose later halves are still to be sent.
restamp_submitting
Restamps submitted_at on rows still submitting, for an import that sends them again after splitting a refused batch: the precondition sweep times a lost submission from this stamp, and must not condemn a row still waiting its turn in the same iteration.
schedule_next_attempt
Defers when the pipeline may next claim this row; the delay is the caller’s policy.
schedule_next_attempts
schedule_next_attempt for a whole batch, each row with its own time.
set_needs_admin_attention
set_payload_snapshot
set_resubmit_not_before
Records Suotar’s retryAfter for the pending submission, before which a resubmission may register the credits twice. See ResubmissionFacts::resubmission_refusal.
set_sisu_attainment_if_unclaimed
Records the attainment the study registry holds, unless another live row already claims it.
set_submitted_attainment