fix: add harder timeouts to uvicorn.run
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Failing after 35s
CI / test (3.11) (pull_request) Successful in 1m5s
CI / test (3.12) (pull_request) Successful in 1m4s
CI / test (3.13) (pull_request) Successful in 1m4s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m21s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m21s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m25s
CI / test-with-coverage (pull_request) Successful in 1m35s
CI / coverage-analysis (pull_request) Failing after 10s
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Failing after 35s
CI / test (3.11) (pull_request) Successful in 1m5s
CI / test (3.12) (pull_request) Successful in 1m4s
CI / test (3.13) (pull_request) Successful in 1m4s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m21s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m21s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m25s
CI / test-with-coverage (pull_request) Successful in 1m35s
CI / coverage-analysis (pull_request) Failing after 10s
This commit is contained in:
@@ -3,6 +3,7 @@ import hmac
|
||||
import importlib
|
||||
import json
|
||||
import os
|
||||
import threading
|
||||
import time
|
||||
from collections.abc import AsyncGenerator
|
||||
from contextlib import asynccontextmanager
|
||||
@@ -133,8 +134,8 @@ async def lifespan(application: FastAPI):
|
||||
yield # ── application serves requests here ──
|
||||
|
||||
# Shutdown: add cleanup here if needed
|
||||
daq.shutdown()
|
||||
logger.info(f"Worker {os.getpid()} shutting down.")
|
||||
daq.shutdown()
|
||||
|
||||
|
||||
app = FastAPI(lifespan=lifespan)
|
||||
@@ -2531,6 +2532,8 @@ def main():
|
||||
proxy_headers=False,
|
||||
log_config=get_uvicorn_logging_config(),
|
||||
timeout_worker_healthcheck=30,
|
||||
timeout_graceful_shutdown=1,
|
||||
timeout_keep_alive=30,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user