feat: disable uvicorn worker lifespan (#2845)
### Description Fix this Django exception: Django can only handle ASGI/HTTP connections, not lifespan.
This commit is contained in:
parent
0e91a7db7d
commit
8743c84d0f
|
@ -167,6 +167,7 @@ WORKDIR /app
|
||||||
CMD ["/usr/local/bin/gunicorn", \
|
CMD ["/usr/local/bin/gunicorn", \
|
||||||
"--workers=4", \
|
"--workers=4", \
|
||||||
"--worker-class=uvicorn.workers.UvicornWorker", \
|
"--worker-class=uvicorn.workers.UvicornWorker", \
|
||||||
|
"--lifespan", "off", \
|
||||||
"--log-file", "-", \
|
"--log-file", "-", \
|
||||||
"--bind=0.0.0.0:9001", \
|
"--bind=0.0.0.0:9001", \
|
||||||
"libretime_api.asgi"]
|
"libretime_api.asgi"]
|
||||||
|
|
|
@ -26,6 +26,7 @@ KillMode=mixed
|
||||||
ExecStart=@@VENV_DIR@@/bin/gunicorn \
|
ExecStart=@@VENV_DIR@@/bin/gunicorn \
|
||||||
--workers 4 \
|
--workers 4 \
|
||||||
--worker-class uvicorn.workers.UvicornWorker \
|
--worker-class uvicorn.workers.UvicornWorker \
|
||||||
|
--lifespan off \
|
||||||
--log-file - \
|
--log-file - \
|
||||||
--bind unix:/run/libretime-api.sock \
|
--bind unix:/run/libretime-api.sock \
|
||||||
libretime_api.asgi
|
libretime_api.asgi
|
||||||
|
|
Loading…
Reference in New Issue