forked from 0x2620/pandora
use environment file for tasks and encoding queue
This commit is contained in:
parent
476fa9f0a3
commit
491d8c4629
4 changed files with 14 additions and 4 deletions
|
@ -7,14 +7,16 @@ Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
User=pandora
|
User=pandora
|
||||||
Group=pandora
|
Group=pandora
|
||||||
|
EnvironmentFile=/srv/pandora/pandora/encoding.conf
|
||||||
PIDFile=/run/pandora/encoding.pid
|
PIDFile=/run/pandora/encoding.pid
|
||||||
WorkingDirectory=/srv/pandora/pandora
|
WorkingDirectory=/srv/pandora/pandora
|
||||||
ExecStart=/srv/pandora/bin/celery \
|
ExecStart=/srv/pandora/bin/celery \
|
||||||
-A app 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 \
|
-c $CONCURRENCY \
|
||||||
-l INFO
|
--maxtasksperchild $MAX_TASKS_PER_CHILD \
|
||||||
|
-l $LOGLEVEL
|
||||||
ExecReload=/bin/kill -TERM $MAINPID
|
ExecReload=/bin/kill -TERM $MAINPID
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
@ -7,14 +7,16 @@ Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
User=pandora
|
User=pandora
|
||||||
Group=pandora
|
Group=pandora
|
||||||
|
EnvironmentFile=/srv/pandora/pandora/tasks.conf
|
||||||
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 app 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 \
|
-c $CONCURRENCY \
|
||||||
-l INFO
|
--maxtasksperchild $MAX_TASKS_PER_CHILD \
|
||||||
|
-l $LOGLEVEL
|
||||||
ExecReload=/bin/kill -TERM $MAINPID
|
ExecReload=/bin/kill -TERM $MAINPID
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
3
pandora/encoding.conf
Normal file
3
pandora/encoding.conf
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
LOGLEVEL=info
|
||||||
|
MAX_TASKS_PER_CHILD=500
|
||||||
|
CONCURRENCY=1
|
3
pandora/tasks.conf
Normal file
3
pandora/tasks.conf
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
LOGLEVEL=info
|
||||||
|
MAX_TASKS_PER_CHILD=1000
|
||||||
|
CONCURRENCY=2
|
Loading…
Reference in a new issue