From ee86c9ab9f7329b10179d28550bd570349f38335 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 16 Jul 2019 12:27:35 +0100 Subject: [PATCH] move celery into app --- etc/systemd/system/pandora-encoding.service | 4 ++-- etc/systemd/system/pandora-tasks.service | 2 +- pandora/{ => app}/celery.py | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) rename pandora/{ => app}/celery.py (94%) diff --git a/etc/systemd/system/pandora-encoding.service b/etc/systemd/system/pandora-encoding.service index 8d5e3bda..b2a48626 100644 --- a/etc/systemd/system/pandora-encoding.service +++ b/etc/systemd/system/pandora-encoding.service @@ -8,9 +8,9 @@ Restart=always User=pandora Group=pandora PIDFile=/run/pandora/encoding.pid -WorkingDirectory=/srv/pandora +WorkingDirectory=/srv/pandora/pandora ExecStart=/srv/pandora/bin/celery \ - -A pandora worker \ + -A app worker \ -Q encoding -n pandora-encoding \ --pidfile /run/pandora/encoding.pid \ --maxtasksperchild 500 \ diff --git a/etc/systemd/system/pandora-tasks.service b/etc/systemd/system/pandora-tasks.service index 277a0072..19cf04af 100644 --- a/etc/systemd/system/pandora-tasks.service +++ b/etc/systemd/system/pandora-tasks.service @@ -10,7 +10,7 @@ Group=pandora PIDFile=/run/pandora/tasks.pid WorkingDirectory=/srv/pandora/pandora ExecStart=/srv/pandora/bin/celery \ - -A pandora worker \ + -A app worker \ -Q default,celery -n pandora-default \ --pidfile /run/pandora/tasks.pid \ --maxtasksperchild 1000 \ diff --git a/pandora/celery.py b/pandora/app/celery.py similarity index 94% rename from pandora/celery.py rename to pandora/app/celery.py index f53044cd..710d0d0e 100644 --- a/pandora/celery.py +++ b/pandora/app/celery.py @@ -3,6 +3,7 @@ import os from celery import Celery root_dir = os.path.normpath(os.path.abspath(os.path.dirname(__file__))) +root_dir = os.path.dirname(root_dir) os.chdir(root_dir) # set the default Django settings module for the 'celery' program.