misc: Replace deprecated uvicorn.workers with uvicorn-worker

According to the `uvicorn` docs [1], the `uvicorn.workers.UvicornWorker`
class is deprecated and replaced by the `uvicorn-worker` package [2].

[1] https://www.uvicorn.org/deployment/#gunicorn
[2] https://github.com/Kludex/uvicorn-worker
This commit is contained in:
Michael Manganiello
2025-07-05 12:59:49 -03:00
parent 346c24e66e
commit ea9def4b85
3 changed files with 22 additions and 7 deletions

View File

@@ -88,10 +88,9 @@ start_bin_gunicorn() {
--bind=unix:/tmp/gunicorn.sock \
--pid=/tmp/gunicorn.pid \
--forwarded-allow-ips="*" \
--worker-class uvicorn.workers.UvicornWorker \
--worker-class uvicorn_worker.UvicornWorker \
--workers "${WEB_CONCURRENCY:-${DEFAULT_WEB_CONCURRENCY:-1}}" \
--error-logfile - \
--error-logfile - \
--log-config /etc/gunicorn/logging.conf \
main:app &
}