Skip to content

Recover receipt uploads interrupted by an API restart - #32

Merged
yipkaio merged 1 commit into
mainfrom
fix/recover-interrupted-receipts
Sep 27, 2026
Merged

yipkaio merged 1 commit into
mainfrom
fix/recover-interrupted-receipts

Conversation

@yipkaio

@yipkaio yipkaio commented Sep 27, 2026

Copy link
Copy Markdown
Owner

What changed

  • On startup, the single API worker marks leftover PROCESSING receipts as FAILED before accepting uploads.
  • A canceled upload also records a failure. Original evidence and saved OCR remain available for review or reprocessing; records without OCR can be deleted and uploaded again.
  • Document recovery and cover restart, deletion, and OCR reprocessing with tests.

Verification

  • python -m pytest -q -p no:cacheprovider: 268 passed, 3 skipped.
  • python -m compileall -q app tests/test_persistence_api.py: passed.

Production runs one API worker. Deploying the updated image and restarting the API will release any currently stuck receipt without clearing stored receipt data.

@yipkaio
yipkaio merged commit 7ac9ef0 into main Sep 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant