chore(tradein): drop uvicorn --reload in prod (WatchFiles overhead) #641
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#641
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "chore/tradein-prod-no-uvicorn-reload"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Prod backend ran uvicorn with
--reload(Dockerfile CMD carries it for dev hot-reload; prod uses the same image). Prod logs showedStarted reloader process [1] using WatchFiles— a wasted file-watcher + risk of reload mid-request on an immutable image.Add a prod-only
command:override (docker-compose.prod.yml backend service) running uvicorn WITHOUT--reload. Single worker kept (no --workers) — the in-app scheduler (app.services.scheduler, tick=60s) lives in the backend process; multiple workers would duplicate scheduled jobs (cian/rosreestr would fire N times). Dev untouched (no command override there → inherits Dockerfile--reloadvia app/ bind-mount).Verification done
backend.command = [uvicorn, app.main:app, --host 0.0.0.0, --port 8000]Started reloader processin logs,scheduler: startedappears once, /health 200Found while verifying the #638/#640 deploys (flagged as a side-note).