caktus / ansible-role-django-k8s

Ansible role with sane defaults to deploy a Django app to Kubernetes.
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Default Celery worker and beat commands not compatible with Celery 5.x #56

Closed copelco closed 2 years ago

copelco commented 2 years ago

Celery options and command args are more strict in Celery 5.x. Relates to:

For example, Celery OPTIONS cannot be supplied for command ARGS:

celery [OPTIONS] COMMAND [ARGS]

An error like this will be displayed:

❯ kubectl -n test logs celery-beat-0    
Usage: celery beat [OPTIONS]
Try 'celery beat --help' for help.

Error: No such option: --workdir

These defaults must be updated to move --workdir before command:

https://github.com/caktus/ansible-role-django-k8s/blob/4f37830596b41c8d412388df15eb8010f41531da/defaults/main.yml#L153-L166

This applies to project-specific overrides too. For example, --queues and --hostname must appear after worker.