chore: Replace deprecated uvicorn.workers with uvicorn-worker

This commit is contained in:
Jason Mok 2024-05-31 01:28:36 -04:00
parent fc5182591f
commit 88c0e68a27
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
release: python manage.py migrate
{%- if cookiecutter.use_async == "y" %}
web: gunicorn config.asgi:application -k uvicorn.workers.UvicornWorker
web: gunicorn config.asgi:application -k uvicorn-worker.UvicornWorker
{%- else %}
web: gunicorn config.wsgi:application
{%- endif %}

View File

@ -28,7 +28,7 @@ if compress_enabled; then
fi
{%- endif %}
{%- if cookiecutter.use_async == 'y' %}
exec /usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 --chdir=/app -k uvicorn.workers.UvicornWorker
exec /usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 --chdir=/app -k uvicorn-worker.UvicornWorker
{%- else %}
exec /usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app
{%- endif %}

View File

@ -106,7 +106,7 @@ function imgCompression() {
function asyncRunServer() {
const cmd = spawn(
'gunicorn',
['config.asgi', '-k', 'uvicorn.workers.UvicornWorker', '--reload'],
['config.asgi', '-k', 'uvicorn-worker.UvicornWorker', '--reload'],
{stdio: 'inherit'},
);
cmd.on('close', function (code) {