Skip to content
Snippets Groups Projects

Django Celery Systemd Unit File

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Evili del Rio i Silvan
    Edited
    django_celery.service 563 B
    [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
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment