当我用sudo运行celery workers时,我得到以下错误:
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).
User information: uid=0 euid=0 gid=0 egid=0
另外,我的C_FORCE_ROOT环境变量是true:
^{pr2}$更多信息:
Python-->2.7.6
芹菜-->3.1.23(Cipater)
操作系统-->;Linux(Ubuntu 14.04)
我该怎么用sudo做芹菜?我知道这不安全,但出于某些原因,我真的需要这么做!在
好吧,我找到了解决办法!
在celery 3.1及更高版本中,pickle序列化的工人将崩溃,如documentation:
所以要使用sudo,需要在celery configs中禁用pickle序列化,我是用json实现的:
然后如果你用sudo运行,它会工作的!在
相关问题 更多 >
编程相关推荐