fix(worker): wait for the DB schema before starting (no crash-loop on fresh deploy)
The worker and API start in parallel; the API applies migrations on its own startup, so on a fresh deploy the worker hit a missing download_jobs table and crash-looped until migrations landed. The worker now polls for the schema before recovering orphans, and (belt-and-suspenders) the compose files gate it on the API being healthy. Fixes the observed prod restart-loop on the v0.22.0 deploy.
This commit is contained in:
parent
fe822598fa
commit
524507ce9b
3 changed files with 30 additions and 0 deletions
|
|
@ -66,6 +66,9 @@ services:
|
|||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
# Start only after the API is healthy (it applies the DB migrations on startup).
|
||||
api:
|
||||
condition: service_healthy
|
||||
bgutil-pot:
|
||||
condition: service_started
|
||||
volumes:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue