Skip to content

Commit

Permalink
Run automation helper with uvicorn_worker.UvicornWorker
Browse files Browse the repository at this point in the history
As recommended by the `uvicorn` docs.

Change-Id: Id7e3b5066016f9caf84cf1d9c70011f34925de40
  • Loading branch information
jherbel committed Feb 13, 2025
1 parent ee1ec94 commit 3d74f7e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmk/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ REQUIRED_EXTERNAL_DEPS = [
"snmpsim-lextudio",
"urllib3",
"uvicorn",
"uvicorn-worker",
"vcrpy",
"watchdog",
]
Expand Down
2 changes: 1 addition & 1 deletion cmk/base/automation_helper/_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def load_config(self) -> None:
self.cfg.set("umask", 0o077)
self.cfg.set("bind", f"unix:{self._config.unix_socket}")
self.cfg.set("workers", self._config.num_workers)
self.cfg.set("worker_class", "uvicorn.workers.UvicornWorker")
self.cfg.set("worker_class", "uvicorn_worker.UvicornWorker")
self.cfg.set("pidfile", str(self._config.pid_file))
self.cfg.set("accesslog", str(self._config.access_log))
self.cfg.set("errorlog", str(self._config.error_log))
Expand Down
1 change: 1 addition & 0 deletions cmk/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@ opentelemetry-semantic-conventions # used for distributed tracing of Checkmk
fastapi # automation helper and needed to run fake idp for cse tests
gunicorn # automation helper
watchdog # automation helper
uvicorn-worker # automation helper
simplejson # mk_jolokia
uvicorn # ui-job-scheduler
4 changes: 3 additions & 1 deletion requirements_runtime_lock.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2757,7 +2757,9 @@ uvicorn==0.34.0 \
uvicorn-worker==0.3.0 \
--hash=sha256:6baeab7b2162ea6b9612cbe149aa670a76090ad65a267ce8e27316ed13c7de7b \
--hash=sha256:ef0fe8aad27b0290a9e602a256b03f5a5da3a9e5f942414ca587b645ec77dd52
# via -r packages/cmk-agent-receiver/requirements.txt
# via
# -r _requirements_runtime.txt
# -r packages/cmk-agent-receiver/requirements.txt
vcrpy==7.0.0 \
--hash=sha256:176391ad0425edde1680c5b20738ea3dc7fb942520a48d2993448050986b3a50 \
--hash=sha256:55791e26c18daa363435054d8b35bd41a4ac441b6676167635d1b37a71dbe124
Expand Down

0 comments on commit 3d74f7e

Please sign in to comment.