Django Celery Systemd Unit File
The snippet can be accessed without any authentication.
Authored by
Evili del Rio i Silvan
Edited
[Unit]
Description=Celery Worker for Django
After=httpd.service rabbitmq-server.service
#
# This unit file starts a celery worker for each Django Application
# with different virtualenvs. (see start_celery_worker).
# To be installed as /etc/systemd/system/django_celery@.service
#
[Service]
Type=forking
Environment=RUN_DIR=/var/run/django
PIDFile=/var/run/django/%i.pid
ExecStart=/usr/local/sbin/start_celery_worker %i
ExecReload=/bin/kill -HUP ${MAINPID}
ExecStop=/bin/kill -KILL ${MAINPID}
KillMode=process
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Please register or sign in to comment