celery4.x 在win10上使用 需要安裝 eventlet包


celery4.x 之前在linux上使用沒有任何問題,后來在win10 上使用報錯如下:

[ERROR/MainProcess] Task handler raised error: ValueError('not enough values to unpack (expected 3, got 0)',)
Traceback (most recent call last):
  File "e:\codewokespace\python\envs\env_django\lib\site-packages\billiard\pool.py", line 358, in workloop
    result = (True, prepare_result(fun(*args, **kwargs)))
  File "e:\codewokespace\python\envs\env_django\lib\site-packages\celery\app\trace.py", line 537, in _fast_trace_task
    tasks, accept, hostname = _loc
ValueError: not enough values to unpack (expected 3, got 0)

在依賴環境上 安裝 eventlet
pip install eventlet

追加啟動work命令參數 -P eventlet
celery -A [task] worker -l info -P eventlet


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM