use environment file for tasks and encoding queue

This commit is contained in:
j 2021-11-15 11:42:32 +00:00
parent 476fa9f0a3
commit 491d8c4629
4 changed files with 14 additions and 4 deletions

View file

@ -7,14 +7,16 @@ Type=simple
Restart=always
User=pandora
Group=pandora
EnvironmentFile=/srv/pandora/pandora/encoding.conf
PIDFile=/run/pandora/encoding.pid
WorkingDirectory=/srv/pandora/pandora
ExecStart=/srv/pandora/bin/celery \
-A app worker \
-Q encoding -n pandora-encoding \
--pidfile /run/pandora/encoding.pid \
--maxtasksperchild 500 \
-l INFO
-c $CONCURRENCY \
--maxtasksperchild $MAX_TASKS_PER_CHILD \
-l $LOGLEVEL
ExecReload=/bin/kill -TERM $MAINPID
[Install]

View file

@ -7,14 +7,16 @@ Type=simple
Restart=always
User=pandora
Group=pandora
EnvironmentFile=/srv/pandora/pandora/tasks.conf
PIDFile=/run/pandora/tasks.pid
WorkingDirectory=/srv/pandora/pandora
ExecStart=/srv/pandora/bin/celery \
-A app worker \
-Q default,celery -n pandora-default \
--pidfile /run/pandora/tasks.pid \
--maxtasksperchild 1000 \
-l INFO
-c $CONCURRENCY \
--maxtasksperchild $MAX_TASKS_PER_CHILD \
-l $LOGLEVEL
ExecReload=/bin/kill -TERM $MAINPID
[Install]

3
pandora/encoding.conf Normal file
View file

@ -0,0 +1,3 @@
LOGLEVEL=info
MAX_TASKS_PER_CHILD=500
CONCURRENCY=1

3
pandora/tasks.conf Normal file
View file

@ -0,0 +1,3 @@
LOGLEVEL=info
MAX_TASKS_PER_CHILD=1000
CONCURRENCY=2