From 3c6be9b1953f4e9c6bfbac8ebeee9599b996bf69 Mon Sep 17 00:00:00 2001 From: kappa118 Date: Sat, 1 Mar 2025 18:38:18 -0500 Subject: [PATCH] updated celery to work in aio container, added new uwsgi config files based on environment --- requirements.txt | 2 +- uwsg.aio.ini | 19 +++++++++++++++++++ uwsgi.dev.ini | 20 ++++++++++++++++++++ uwsgi.ini | 4 ---- 4 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 uwsg.aio.ini create mode 100644 uwsgi.dev.ini diff --git a/requirements.txt b/requirements.txt index d479a65c..a8c883ca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ Django==5.1.6 gunicorn==23.0.0 psycopg2-binary==2.9.10 redis==4.5.5 -celery==5.2.7 +celery djangorestframework==3.15.2 requests==2.32.3 psutil==7.0.0 diff --git a/uwsg.aio.ini b/uwsg.aio.ini new file mode 100644 index 00000000..5c1f6709 --- /dev/null +++ b/uwsg.aio.ini @@ -0,0 +1,19 @@ +[uwsgi] +preexec = python manage.py collectstatic --noinput +preexec = python manage.py migrate --noinput + +http-socket = [::]:9191 +buffer-size = 32768 +enable-threads +plugin = python3 +module = dispatcharr.wsgi:application +static-map = /static=staticfiles +thunder-lock +disable-write-exception + +virtualenv = /dispatcharrpy + +max-fd = 10000 + +attach-daemon = celery -A dispatcharr worker -l info +attach-daemon = redis-server diff --git a/uwsgi.dev.ini b/uwsgi.dev.ini new file mode 100644 index 00000000..76016d27 --- /dev/null +++ b/uwsgi.dev.ini @@ -0,0 +1,20 @@ +[uwsgi] +preexec = python manage.py collectstatic --noinput +preexec = python manage.py migrate --noinput + +http-socket = [::]:5656 +buffer-size = 32768 +enable-threads +plugin = python3 +module = dispatcharr.wsgi:application +static-map = /static=staticfiles +thunder-lock +disable-write-exception + +virtualenv = /dispatcharrpy + +max-fd = 10000 + +attach-daemon = celery -A dispatcharr worker -l info +attach-daemon = redis-server +attach-daemon = npm run start diff --git a/uwsgi.ini b/uwsgi.ini index cb2f715e..24cc29f7 100644 --- a/uwsgi.ini +++ b/uwsgi.ini @@ -14,7 +14,3 @@ disable-write-exception virtualenv = /dispatcharrpy max-fd = 10000 - -; attach-daemon = npm run start -; attach-daemon = python3 ./manage.py sendreports --loop -; attach-daemon = python3 ./manage.py smtpd --port 2525