celery.service 695 B

123456789101112131415161718192021
  1. [Unit]
  2. Description=Celery Service
  3. After=network.target
  4. [Service]
  5. Type=forking
  6. User=celery
  7. Group=celery
  8. EnvironmentFile=-/etc/conf.d/celery
  9. WorkingDirectory=/opt/celery
  10. ExecStart=/bin/sh -c '${CELERY_BIN} multi start $CELERYD_NODES \
  11. -A $CELERY_APP --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} \
  12. --loglevel="${CELERYD_LOG_LEVEL}" $CELERYD_OPTS'
  13. ExecStop=/bin/sh -c '${CELERY_BIN} multi stopwait $CELERYD_NODES \
  14. --pidfile=${CELERYD_PID_FILE}'
  15. ExecReload=/bin/sh -c '${CELERY_BIN} multi restart $CELERYD_NODES \
  16. -A $CELERY_APP --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} \
  17. --loglevel="${CELERYD_LOG_LEVEL}" $CELERYD_OPTS'
  18. [Install]
  19. WantedBy=multi-user.target