celery.service 718 B

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