不能用root用户启动Celery Worker的问题

Running a worker with superuser privileges when the
worker accepts messages serialized with pickle is a very bad idea!

If you really want to continue then you have to set the C_FORCE_ROOT
environment variable (but please think about this before you do).

解决方法如下:
方法一

     export C_FORCE_ROOT="true" 如此就能正常启动celery了

方法二

在项目代码中
from celery import Celery, platforms # 导入platforms
app = Celery('tasks', broker='amqp://myuser:
mypassword@localhost :5672/vhost')
platforms.C_FORCE_ROOT = True #加上这一行

你可能感兴趣的:(不能用root用户启动Celery Worker的问题)