vxsuite icon indicating copy to clipboard operation
vxsuite copied to clipboard

Finish marking CVR export as complete before setting polls store state to closed in backend polls-close handler

Open arsalansufi opened this issue 1 year ago • 0 comments

Relevant handler:

https://github.com/votingworks/vxsuite/blob/21231af4df88ab05694b02795b69afa2cc796b17/apps/scan/backend/src/polls.ts#L50-L95

Today, we set the polls store state to closed first, then mark the CVR export as complete. If the latter fails, you run the risk of the export being left in a bad state, with your only course of corrective action being a slow full re-export. By switching the order of operations, you'd be able to correct things by just trying to close polls again, a much faster operation.

arsalansufi avatar Apr 24 '24 20:04 arsalansufi