diff --git a/etc/systemd/system/pandora-encoding.service b/etc/systemd/system/pandora-encoding.service index b2a486262..fa791febf 100644 --- a/etc/systemd/system/pandora-encoding.service +++ b/etc/systemd/system/pandora-encoding.service @@ -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] diff --git a/etc/systemd/system/pandora-tasks.service b/etc/systemd/system/pandora-tasks.service index 19cf04afa..d8fe1b585 100644 --- a/etc/systemd/system/pandora-tasks.service +++ b/etc/systemd/system/pandora-tasks.service @@ -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] diff --git a/pandora/encoding.conf b/pandora/encoding.conf new file mode 100644 index 000000000..af15426c5 --- /dev/null +++ b/pandora/encoding.conf @@ -0,0 +1,3 @@ +LOGLEVEL=info +MAX_TASKS_PER_CHILD=500 +CONCURRENCY=1 diff --git a/pandora/tasks.conf b/pandora/tasks.conf new file mode 100644 index 000000000..245a3562f --- /dev/null +++ b/pandora/tasks.conf @@ -0,0 +1,3 @@ +LOGLEVEL=info +MAX_TASKS_PER_CHILD=1000 +CONCURRENCY=2