summaryrefslogtreecommitdiffstats
path: root/aurweb/spawn.py
diff options
context:
space:
mode:
authorKevin Morris <kevr@0cost.org>2020-12-23 21:53:28 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2021-02-20 17:27:56 +0100
commit8ce96ac20830ce222fb7f75ef8ab1ad2669539b0 (patch)
treec6a467c692f6d34606967c1893cc53a3df1149b4 /aurweb/spawn.py
parent21c457817fe8ec5db60a10e2270f9fcf951aca5f (diff)
downloadaur-8ce96ac20830ce222fb7f75ef8ab1ad2669539b0.tar.gz
aur-8ce96ac20830ce222fb7f75ef8ab1ad2669539b0.tar.xz
swap uvicorn out for hypercorn
Signed-off-by: Kevin Morris <kevr@0cost.org> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'aurweb/spawn.py')
-rw-r--r--aurweb/spawn.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/aurweb/spawn.py b/aurweb/spawn.py
index 3c5130d7..e10db911 100644
--- a/aurweb/spawn.py
+++ b/aurweb/spawn.py
@@ -31,6 +31,7 @@ class ProcessExceptions(Exception):
Compound exception used by stop() to list all the errors that happened when
terminating child processes.
"""
+
def __init__(self, message, exceptions):
self.message = message
self.exceptions = exceptions
@@ -110,9 +111,7 @@ def start():
# FastAPI
host, port = aurweb.config.get("fastapi", "bind_address").rsplit(":", 1)
- spawn_child(["python", "-m", "uvicorn",
- "--host", host,
- "--port", port,
+ spawn_child(["python", "-m", "hypercorn", "-b", f"{host}:{port}",
"aurweb.asgi:app"])
# nginx