diff options
author | Kevin Morris <kevr@0cost.org> | 2020-12-23 21:53:28 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2021-02-20 17:27:56 +0100 |
commit | 8ce96ac20830ce222fb7f75ef8ab1ad2669539b0 (patch) | |
tree | c6a467c692f6d34606967c1893cc53a3df1149b4 | |
parent | 21c457817fe8ec5db60a10e2270f9fcf951aca5f (diff) | |
download | aur-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>
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | INSTALL | 3 | ||||
-rw-r--r-- | aurweb/spawn.py | 5 |
3 files changed, 5 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9dc951aa..aff18a83 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ before_script: base-devel git gpgme protobuf pyalpm python-mysql-connector python-pygit2 python-srcinfo python-bleach python-markdown python-sqlalchemy python-alembic python-pytest python-werkzeug - python-pytest-tap python-fastapi uvicorn nginx python-authlib + python-pytest-tap python-fastapi hypercorn nginx python-authlib python-itsdangerous python-httpx test: @@ -48,7 +48,8 @@ read the instructions below. 4) Install Python modules and dependencies: # pacman -S python-mysql-connector python-pygit2 python-srcinfo python-sqlalchemy \ - python-bleach python-markdown python-alembic + python-bleach python-markdown python-alembic python-jinja \ + python-itsdangerous python-authlib python-httpx hypercorn # python3 setup.py install 5) Create a new MySQL database and a user and import the aurweb SQL schema: 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 |