Recover stuck PROCESSING meetings on app startup#32
Merged
Conversation
Scans all meeting directories on startup for metadata with status=processing and transitions them to error state with a descriptive error message.
Adds a lifespan context manager that calls recover_stuck_meetings() before the app starts serving requests.
- Add from __future__ import annotations to main.py - Catch write errors per-meeting so one failure doesn't abort recovery - Fix fragile test assertion ordering
Member
Author
QA Confidence VerdictWhat Was Verified
What Needs Human Eyes
Risk Areas
Suggested QA Focus
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #16
Summary
On app restart, meetings left in PROCESSING status become orphaned since job state is in-memory only. This adds a startup recovery mechanism that scans all meetings and transitions any stuck PROCESSING meetings to ERROR status, enabling users to retry them via the existing retry button.
Approach
Added a
recover_stuck_meetings()function in a newbackend/services/recovery.pymodule, wired into FastAPI's lifespan context manager so it runs before the app starts serving requests. Each stuck meeting is individually recovered with error handling so one failure doesn't abort the rest.No UI changes needed — ERROR status meetings already display the retry button.
Verification