Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
copelco opened this issue Feb 11, 2022 · 0 comments · Fixed by #57
Closed

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

copelco opened this issue Feb 11, 2022 · 0 comments · Fixed by #57
Labels
bug Something isn't working

Comments

@copelco
Copy link
Member

copelco commented Feb 11, 2022

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:

k8s_worker_command:
- celery
- --app={{ k8s_worker_celery_app }}
- worker
- --workdir=/code
- --loglevel=info
k8s_worker_beat_command:
- celery
- --app={{ k8s_worker_celery_app }}
- beat
- --workdir=/code
- --loglevel=info
- --pidfile=/data/beat.pid
- --schedule=/data/schedulefile.db

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

@copelco copelco added the bug Something isn't working label Feb 11, 2022
copelco added a commit that referenced this issue Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant