The tradein-scraper container runs the same image as backend (python -m app.scheduler_main, in-app scheduler) and owns the in-flight scrape sweeps (a browser card takes ~15-27s). Two problems compounded to kill running jobs on every deploy: Phase 0 (deploy-tradein.yml): SCRAPER_CHANGED also fired on the `infra` paths-filter (compose / workflow / deploy/**), so any generic infra edit recreated the scraper container and SIGKILLed the running job. Dropped the `|| infra == 'true'` term — only real scraper-code paths (already covered by the `scraper` paths-filter) or a manual workflow_dispatch recreate it. Phase 1 (docker-compose.prod.yml): the scraper had no stop_grace_period, so Docker's default 10s window SIGKILLed an in-flight card (15-27s) before it could finish. Added stop_grace_period: 120s + explicit stop_signal: SIGTERM so a running unit can finish + checkpoint. The cooperative-drain handler that consumes SIGTERM lands in a later phase; this is the foundation. |
||
|---|---|---|
| .. | ||
| ci.yml | ||
| deploy-tradein.yml | ||
| deploy.yml | ||
| stale-claims.yml | ||