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).
from celery import Celery, platforms
app = Celery('tasks', broker='amqp://myuser:
platforms.C_FORCE_ROOT = True #加上这一行
def add(x, y):
return x + y