Expand description
The verify phase: asking the study registry what became of a submission.
The only way out of submission_uncertain, and never a way back to import. Nothing here ever
fails a row: the attainment may exist, and a failed row is one an admin retries, which for an
uncertain submission would mean sending it twice.
Structsยง
- Poll ๐
- One claimed row and the poll it was claimed for. The attempt count travels with it because it names the request item and sets the backoff the answer is scheduled by.
- Recovery ๐
- A row whose submission we lost track of: nothing to poll by, so the lookup goes through
resolve-enrolmentsinstead. - Uncertain
Recovery ๐ - Looks for the attainment a submission we lost track of would have produced. The row stays
submission_uncertainunless it is found: never failed, never re-imported. - Verify
Poll ๐ - Polls the rows that have something to poll by.
Constantsยง
- CLAIMED_
STATES ๐ - Both states the poller owns. Withdrawal moves a row out of both, which is what stops the polling without any query having to know about withdrawal.
Functionsยง
- add ๐
- Sums what the two flows of one iteration did; the first error stands for the iteration.
- apply_
poll_ ๐answer - Applies one pollโs answer. Everything but
registeredkeeps the row where it is:notRegisteredis a normal polling answer, and any other answer is one we will not act on blindly. - apply_
recovery_ ๐answer - run