[英]How to start celery 5 using django?
I am getting this error when trying to start the celery service.尝试启动 celery 服务时出现此错误。
I figured it would be the version of celery 5.我认为这将是 celery 5 的版本。
But I still haven't found a solution.但我仍然没有找到解决办法。
Thanks for listening friends.感谢朋友的聆听。
Setting环境
http://docs.celeryproject.org/en/v4.0.2/userguide/configuration.html
CELERY_BROKER_URL = 'redis://:123456@redis:6379/0'
CELERY_RESULT_BACKEND = 'redis://:123456@redis:6379/0'
CELERY_ACCEPT_CONTENT = ['application/json']
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TASK_SERIALIZER = 'json'
root@b9249c0a5916:/usr/src/app# celery -A sistema worker -l info
Usage: celery worker [OPTIONS]
Try 'celery worker --help' for help.
Error: Invalid value for '-l' / '--loglevel': invalid choice: info. (choose from DEBUG, INFO, WARNING, ERROR, CRITICAL, FATAL)
root@b9249c0a5916:/usr/src/app#
The error seems explicit:错误似乎很明确:
Error: Invalid value for '-l' / '--loglevel': invalid choice: info. (choose from DEBUG, INFO, WARNING, ERROR, CRITICAL, FATAL)
Doesn't this work?这不行吗?
root@b9249c0a5916:/usr/src/app# celery -A sistema worker -l INFO
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.