move celery into app

This commit is contained in:
j 2019-07-16 12:27:35 +01:00
parent 46621522b1
commit ee86c9ab9f
3 changed files with 4 additions and 3 deletions

View file

@ -8,9 +8,9 @@ Restart=always
User=pandora User=pandora
Group=pandora Group=pandora
PIDFile=/run/pandora/encoding.pid PIDFile=/run/pandora/encoding.pid
WorkingDirectory=/srv/pandora WorkingDirectory=/srv/pandora/pandora
ExecStart=/srv/pandora/bin/celery \ ExecStart=/srv/pandora/bin/celery \
-A pandora worker \ -A app worker \
-Q encoding -n pandora-encoding \ -Q encoding -n pandora-encoding \
--pidfile /run/pandora/encoding.pid \ --pidfile /run/pandora/encoding.pid \
--maxtasksperchild 500 \ --maxtasksperchild 500 \

View file

@ -10,7 +10,7 @@ Group=pandora
PIDFile=/run/pandora/tasks.pid PIDFile=/run/pandora/tasks.pid
WorkingDirectory=/srv/pandora/pandora WorkingDirectory=/srv/pandora/pandora
ExecStart=/srv/pandora/bin/celery \ ExecStart=/srv/pandora/bin/celery \
-A pandora worker \ -A app worker \
-Q default,celery -n pandora-default \ -Q default,celery -n pandora-default \
--pidfile /run/pandora/tasks.pid \ --pidfile /run/pandora/tasks.pid \
--maxtasksperchild 1000 \ --maxtasksperchild 1000 \

View file

@ -3,6 +3,7 @@ import os
from celery import Celery from celery import Celery
root_dir = os.path.normpath(os.path.abspath(os.path.dirname(__file__))) root_dir = os.path.normpath(os.path.abspath(os.path.dirname(__file__)))
root_dir = os.path.dirname(root_dir)
os.chdir(root_dir) os.chdir(root_dir)
# set the default Django settings module for the 'celery' program. # set the default Django settings module for the 'celery' program.