celery.service 671 B

12345678910111213141516
  1. [Unit]
  2. Description=Celery Nodes Daemon
  3. After=network.target
  4. [Service]
  5. Type=forking
  6. User=user
  7. Group=users
  8. EnvironmentFile=-/etc/conf.d/celery
  9. WorkingDirectory=/opt/Myproject/
  10. ExecStart=/usr/bin/python2 ${CELERYD_BIN}/manage.py multi start $CELERYD_NODES --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} --loglevel="INFO" $CELERYD_OPTS
  11. ExecStop=/usr/bin/python2 ${CELERYD_BIN}/manage.py multi stopwait $CELERYD_NODES --pidfile=${CELERYD_PID_FILE}
  12. ExecReload=/usr/bin/python2 ${CELERYD_BIN}/manage.py multi restart $CELERYD_NODES --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} --loglevel="INFO" $CELERYD_OPTS
  13. [Install]
  14. WantedBy=multi-user.target