Celery 4.0+
does not officially support window already. But it still works on window for some development/test purpose.
Use eventlet
instead as below:
pip install eventlet
celery -A <module> worker -l info -P eventlet
It works for me on window 10
+ celery 4.1
+ python 3
.
This solution solved the following exception:
[2017-11-16 21:19:46,938: ERROR/MainProcess] Task handler raised error: ValueError('need more than 0 values to unpack',)
Traceback (most recent call last):
File "c:userswchen8workvenvweinstalibsite-packagesilliardpool.py", line 358, in workloop
result = (True, prepare_result(fun(*args, **kwargs)))
File "c:userswchen8workvenvweinstalibsite-packagesceleryapprace.py", line 525, in _fast_trace_task
tasks, accept, hostname = _loc
ValueError: need more than 0 values to unpack
===== update 2018-11 =====
Eventlet has an issue on subprocess.CalledProcessError:
https://github.com/celery/celery/issues/4063
https://github.com/eventlet/eventlet/issues/357
https://github.com/eventlet/eventlet/issues/413
So try gevent
instead.
pip install gevent
celery -A <module> worker -l info -P gevent
This works for me on window 10
+ celery 4.2
+ python 3.6
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…