celery 启用worker ValueError: not enough values to unpack

Posted getcharzp

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了celery 启用worker ValueError: not enough values to unpack相关的知识,希望对你有一定的参考价值。

[2018-01-12 19:08:15,545: INFO/MainProcess] Received task: tasks.add[5d387722-5389-441b-9b01-a619b93b4702]
[2018-01-12 19:08:15,550: ERROR/MainProcess] Task handler raised error: ValueError(‘not enough values to unpack (expected 3, got 0)‘,)
Traceback (most recent call last):
File "d:\programmingsoftware\python35\lib\site-packages\billiard\pool.py", line 358, in workloop
result = (True, prepare_result(fun(*args, **kwargs)))
File "d:\programmingsoftware\python35\lib\site-packages\celery\app\trace.py", line 525, in _fast_trace_task
tasks, accept, hostname = _loc
ValueError: not enough values to unpack (expected 3, got 0)
--------------------------------------------------------------------------------------------------------------------------------------------------------------

celery worker -A tasks -l INFO 报错解决办法

1、安装 eventlet

pip install eventlet

2、输入以下命令启用worker

celery -A tasks worker -l INFO -P eventlet

 

以上是关于celery 启用worker ValueError: not enough values to unpack的主要内容,如果未能解决你的问题,请参考以下文章

Celery用户指引--Workers启动重启

如何理解celery中的worker并发和多worker

在弹性豆茎上运行 celery-worker

python celery多worker多队列定时任务

分开使用 Celery beat and worker

Celery --beat on Heroku vs Worker 和 Clock 进程