celery.service 686 B

1234567891011121314151617181920212223
  1. [Unit]
  2. Description=Celery workers
  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=${CELERY_BIN} multi start $CELERYD_NODES \
  11. -A $CELERY_APP --pidfile=${CELERYD_PID_FILE} \
  12. --logfile=${CELERYD_LOG_FILE} --loglevel="${CELERYD_LOG_LEVEL}" \
  13. $CELERYD_OPTS
  14. ExecStop=${CELERY_BIN} multi stopwait $CELERYD_NODES \
  15. --pidfile=${CELERYD_PID_FILE}
  16. ExecReload=${CELERY_BIN} multi restart $CELERYD_NODES \
  17. -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
  18. --logfile=${CELERYD_LOG_FILE} --loglevel="${CELERYD_LOG_LEVEL}" \
  19. $CELERYD_OPTS
  20. [Install]
  21. WantedBy=multi-user.target