Skip to main content

Module use_cases

Module use_cases 

Source
Expand description

The application layer: one module per phase, and account_linking for the linking mail resend, each reading its rows, asking the study registry through its port, deciding, and writing the decision back.

Use cases call the models crate directly and reach the study registry only through crate::registry::StudyRegistry or crate::registry::InteractiveStudyRegistry: Suotarโ€™s client, wire types, request ids, limiter and breakers are runtime::suotarโ€™s.

Modulesยง

account_linking ๐Ÿ”’
The account-linking action an admin or a teacher sets off by hand: re-running the linking mail send path for one person on one course. Not a phase: no schedule and no allowance, and no breaker learns from its calls, so one click cannot trip the workersโ€™.
batch_flow ๐Ÿ”’
The loop every โ€œclaim rows, send one batch, write one answer per rowโ€ flow shares: the claimโ€™s transaction, splitting a batch the study registry refused as malformed, the halves held back and released when a shutdown or an error stops the split, the refusals, one rowโ€™s failed write not costing the rest theirs, the moved-on rows and the batch summary. What goes on the wire, request ids, the limiter and the breakers are the registry adapterโ€™s.
config_validation ๐Ÿ”’
The config-validation phase: the daily pass over every Suotar-enabled moduleโ€™s configuration.
enrolment_discovery ๐Ÿ”’
The enrolment-discovery phase: who the study registry says is on the course.
import ๐Ÿ”’
The import phase: the one call that creates something in the study registry.
ledger_snapshot ๐Ÿ”’
The ledger-snapshot phase: the dayโ€™s queue depth for every ledger state.
legacy_mirror ๐Ÿ”’
The legacy-mirror phase: copying successful registrations to the legacy ledger.
link_emails ๐Ÿ”’
The link-emails phase: turning a claimed mail slot into a queued message.
mail_queue ๐Ÿ”’
What the two mail phases share: the template lookup, and the accounting of what one iteration queued and skipped.
materialize ๐Ÿ”’
The materialize phase: the ledger rows for completions that became eligible, and for grades that improved on a registered one.
preconditions ๐Ÿ”’
The preconditions phase: moving rows along, or out of, the chain of things that must be true before we submit.
resolve_enrolments ๐Ÿ”’
The resolve-enrolments phase: which enrolment the attainment belongs to, and what we will send.
retention_sweep ๐Ÿ”’
The retention-sweep phase: clearing out records past their retention window.
student_notifications ๐Ÿ”’
The student-notifications phase: the only thing that queues a student mail about a credit registration.
verify ๐Ÿ”’
The verify phase: asking the study registry what became of a submission.