无法启动Celery Worker(Kombu.asynchronous.timer) [英] Cannot start Celery Worker (Kombu.asynchronous.timer)
问题描述
我遵循Celery(Django)的第一步,并尝试在后台运行繁重的过程。我已经安装了RabbitMQ服务器。但是,当我尝试使用
celery -a my_app worker -l info
时,它会引发以下错误
I followed the first steps with Celery (Django) and trying to run a heavy process in the background. I have RabbitMQ server installed. However, when I try,
celery -A my_app worker -l info
it throws the following error
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "c:\anaconda3\lib\site-packages\celery\concurrency\prefork.py", line
18, in <module>
from celery.concurrency.base import BasePool
File "c:\anaconda3\lib\site-packages\celery\concurrency\base.py", line 15,
in <module>
from celery.utils import timer2
File "c:\anaconda3\lib\site-packages\celery\utils\timer2.py", line 16, in
<module>
from kombu.asynchronous.timer import Entry
ModuleNotFoundError: No module named 'kombu.asynchronous.timer'
我已经搜索了很多,但似乎无法正常工作。任何帮助将不胜感激。谢谢!
I've searched a lot, but can't seem to get it working. Any help will be highly appreciated. Thank you!
推荐答案
我遇到了同样的问题,但是在重新安装3.1.25版本的celery时解决了该问题b
$ b
I have the same problem, but solved it when reinstall celery with version 3.1.25
pip uninstall celery && pip install celery==3.1.25
也许是因为芹菜4并未正式支持Windows,所以 https://github.com/celery/celery/issues/3551
Maybe because windows is not officially supported by celery 4, https://github.com/celery/celery/issues/3551
这篇关于无法启动Celery Worker(Kombu.asynchronous.timer)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!