Dev: a reload waits at most five seconds for open connections

This commit is contained in:
Melvin Strobl
2026-10-16 20:46:42 +02:00
parent ecc4bee4bb
commit 312f35be3e
+7 -3
View File
@@ -95,9 +95,11 @@ services:
context: ..
dockerfile: backend/Dockerfile
# uvicorn itself, because `fastapi dev` cannot turn per-message deflate
# off, which `fluksio serve` does for the media frames. Watching the worker
# too makes a worker edit restart the engine, which respawns the local
# worker pool with the new code.
# off, which `fluksio serve` does for the media frames. A reload gives
# open connections five seconds: a device's socket that never finishes
# closing held the old process, and with it the reload, for good. Watching
# the worker too makes a worker edit restart the engine, which respawns the
# local worker pool with the new code.
command:
- uvicorn
- fluksio.main:app
@@ -108,6 +110,8 @@ services:
- "8000"
- --ws-per-message-deflate
- "false"
- --timeout-graceful-shutdown
- "5"
- --reload-dir
- /app/backend
- --reload-dir