Skip to content

deploy: maintenance-mode flag and a worker shutdown grace period - #106

Merged
shaddi merged 1 commit into
mainfrom
deploy-maintenance-mode
Jul 7, 2026
Merged

deploy: maintenance-mode flag and a worker shutdown grace period#106
shaddi merged 1 commit into
mainfrom
deploy-maintenance-mode

Conversation

@shaddi

@shaddi shaddi commented Jul 7, 2026

Copy link
Copy Markdown
Member

Add a maintenance mode for upgrades w/ a graceful worker shutdown period.

Maintenance mode: touching /srv/bdk/maintenance/on on the web host
makes nginx answer every new request with a plain 503 + Retry-After
(checked per request — no reload; rm restores instantly). In-flight
requests are unaffected. The flag lives outside the checkout on
purpose: deploy.sh refuses a dirty tree and an untracked flag file
would count as dirty. Verified end-to-end against a stub backend
(200 -> touch -> 503 with body -> rm -> 200).

Worker stop_grace_period 15m: Docker's 10s default SIGKILLed celery's
warm shutdown mid-task, which would kill a minutes-long tile build or
fabric import on every deploy that caught one in flight. With the
queue drained first, shutdown remains instant.
@shaddi
shaddi merged commit df3ee1e into main Jul 7, 2026
3 checks passed
@shaddi
shaddi deleted the deploy-maintenance-mode branch July 7, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant