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
466 B
Desktop File
21 lines
466 B
Desktop File
[Unit]
|
|
Description=pandora tasks daemon
|
|
|
|
[Service]
|
|
Type=simple
|
|
Restart=always
|
|
User=pandora
|
|
Group=pandora
|
|
PIDFile=/run/pandora/tasks.pid
|
|
WorkingDirectory=/srv/pandora/pandora
|
|
StandardOutput=syslog
|
|
StandardError=syslog
|
|
ExecStart=/srv/pandora/bin/python /srv/pandora/pandora/manage.py \
|
|
celeryd \
|
|
-Q default,celery -n pandora-default \
|
|
--pidfile /run/pandora/tasks.pid \
|
|
-l INFO
|
|
ExecReload=/bin/kill -TERM $MAINPID
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|