- 本地“python manage.py celery worker --settings=settings”启动celery,报错如下:
{'timelimit': (None, None), 'utc': False, 'chord': None, 'args': [], 'retries': 0, 'expires': None, 'task': u'home_application.celery_tasks.get_data_cycle_info', 'callbacks': None, 'errbacks': None, 't
askset': None, 'kwargs': {}, 'eta': None, 'id': '881d3c41-0d40-4a0e-9a86-60eca081b49c'} (248b)
Traceback (most recent call last):
File "C:\python_env\dc_iip\lib\site-packages\celery\worker\consumer.py", line 455, in on_task_received
strategies[name](message, body,
KeyError: u'home_application.celery_tasks.get_data_cycle_info'
前期运行celery任务,后因项目规范化,将框架初始化的app名字修改为指定的项目名称。
windows下rabbitMQ服务一直跑着,其中还记录着之前的app名字,所以报错。
- 解决方法: 重启RabbitMQ服务即可