Add worker wrapper to fix Deb incompatibility

Celery 5.x introduced a new worker argument format that is not
backwards-compatible with the older Celery 4.x format. This created a
conundrum since we use one service unit for both Debian 10 (4.x) and
Debian 11 (5.x). Instead of worse hacks, create a wrapper script to
start the worker with the correct arguments instead.
This commit is contained in:
2021-06-28 12:18:48 -04:00
parent dbfa339cfb
commit 4e2a1c3e52
2 changed files with 41 additions and 1 deletions

View File

@ -9,7 +9,7 @@ Type = simple
WorkingDirectory = /usr/share/pvc
Environment = PYTHONUNBUFFERED=true
Environment = PVC_CONFIG_FILE=/etc/pvc/pvcapid.yaml
ExecStart = /usr/bin/celery --app pvcapid.flaskapi.celery worker --concurrency 1 --loglevel INFO
ExecStart = /usr/share/pvc/pvcapid-worker.sh
Restart = on-failure
[Install]