This repository has been archived on 2025-04-27. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
newsreader-ansible/templates/celery.j2

25 lines
897 B
Django/Jinja

# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
#
[Unit]
Description=Celery Service
After=systemd-networkd-wait-online.service
[Service]
Type=forking
User=newsreader
Group=newsreader
SyslogIdentifier=celery
EnvironmentFile=/home/newsreader/.config/conf.d/celery
RuntimeDirectory=celery
WorkingDirectory={{ app_dir }}/src
ExecStart=/bin/sh -c '${CELERY_BIN} multi start ${CELERYD_NODES} \
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
--loglevel=${CELERYD_LOG_LEVEL} --logfile=${CELERYD_LOG_FILE} ${CELERYD_OPTS}'
ExecStop=/bin/sh -c '${CELERY_BIN} multi stopwait ${CELERYD_NODES} \
--pidfile=${CELERYD_PID_FILE}'
ExecReload=/bin/sh -c '${CELERY_BIN} multi restart ${CELERYD_NODES} \
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
--loglevel=${CELERYD_LOG_LEVEL} --logfile=${CELERYD_LOG_FILE} ${CELERYD_OPTS}'
[Install]
WantedBy=multi-user.target