Switch from hypercorn to uvicorn

This commit is contained in:
W13R 2022-03-16 18:27:05 +01:00
parent c49798a9ea
commit 7cb5e096b5
4 changed files with 11 additions and 13 deletions

View file

@ -50,7 +50,7 @@ print(f"HTTP Access Log will be written to {CADDY_ACCESS_LOG}")
try:
# start django/hypercorn
# start django/uvicorn
if devel:
run(
@ -75,7 +75,10 @@ try:
)
app_process = Popen(
[
"hypercorn", "--bind", quote(f"localhost:{DJANGO_PORT}"), "drinks_manager.asgi:application"
"uvicorn",
"--host", "localhost",
"--port", quote(DJANGO_PORT),
"drinks_manager.asgi:application"
],
stdout=application_log_file,
stderr=application_log_file,
@ -137,7 +140,7 @@ except KeyboardInterrupt:
if devel:
print(f"Django stopped with exit code {app_process.returncode}.")
else:
print(f"Django/Hypercorn stopped with exit code {app_process.returncode}.")
print(f"Django/Uvicorn stopped with exit code {app_process.returncode}.")
if caddy_process.returncode != 0 or scs_process.returncode != 0 or app_process.returncode !=0:
exit(1)