feat(worker): load config using shared helpers

BREAKING CHANGE: The worker `RMQ_CONFIG_FILE` environement variable has
been renamed to `LIBRETIME_CONFIG_FILEPATH`. In addition the systemd
working directory for the worker has changed from `/srv/airtime` to
`/var/lib/libretime/worker`.
This commit is contained in:
jo 2022-02-22 20:03:31 +01:00 committed by Kyle Robbertze
parent d42615eb6a
commit 9b6d657fd6
7 changed files with 29 additions and 36 deletions

View file

@ -1,13 +1,18 @@
[Unit]
Description=LibreTime Celery Service
After=network.target
Description=LibreTime Worker Service
[Service]
User=celery
Group=celery
Environment=RMQ_CONFIG_FILE=/etc/airtime/airtime.conf
WorkingDirectory=/srv/airtime
ExecStart=/usr/local/bin/celery worker -A libretime_worker.tasks:celery --time-limit=1800 --concurrency=1 --config=celeryconfig -l INFO
Environment=LIBRETIME_CONFIG_FILEPATH=/etc/airtime/airtime.conf
WorkingDirectory=/var/lib/libretime/worker
ExecStart=/usr/local/bin/celery worker \
--app=libretime_worker.tasks:worker \
--config=libretime_worker.config \
--time-limit=1800 \
--concurrency=1 \
--loglevel=INFO
User=libretime-worker
Group=libretime-worker
Restart=always
[Install]