Will Thompson
7554b0c105
Sending HUP to the parent of a family of celery workers causes the parent to re-exec itself, spawning a new set of child workers without terminating the old ones. So instead we send TERM to the parent on 'reload', which cleans up the children, and rely on systemd/upstart to respawn the whole family.
21 lines
470 B
Desktop File
21 lines
470 B
Desktop File
[Unit]
|
|
Description=pandora encoding daemon
|
|
|
|
[Service]
|
|
Type=simple
|
|
Restart=always
|
|
User=pandora
|
|
Group=pandora
|
|
PIDFile=/run/pandora/encoding.pid
|
|
WorkingDirectory=/srv/pandora/pandora
|
|
StandardOutput=syslog
|
|
StandardError=syslog
|
|
ExecStart=/srv/pandora/bin/python /srv/pandora/pandora/manage.py \
|
|
celeryd \
|
|
-Q encoding -n pandora-encoding \
|
|
--pidfile /run/pandora/encoding.pid \
|
|
-l INFO
|
|
ExecReload=/bin/kill -TERM $MAINPID
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|