reels-app/app
Sebastjan Artič 534d710e8a Auto-resume jobs interrupted by container restart
When Coolify redeploys, the container is killed mid-job.
Now on FastAPI startup:
- Detect status=processing jobs from JOBS_DIR
- If input file exists and resume_attempts < 3, restart pipeline (status=queued)
- After 3 failed attempts, mark as error
- If input is missing, mark error immediately
- Track resume_attempts and last_resume_at for diagnostics

Run actual process_job in asyncio executor (sync function in thread)
so startup completes quickly and resume happens in background.

Resolves: 'Veseli Dolenci stuck' issue
2026-04-29 08:52:16 +00:00
..
main.py Auto-resume jobs interrupted by container restart 2026-04-29 08:52:16 +00:00