您当前的位置: 首页 > 
  • 0浏览

    0关注

    516博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

celeryroot用户启动问题 C_FORCE_ROOT

不太灵光的程序员 发布时间:2019-11-26 15:48:10 ,浏览量:0

问题

celery不能用root用户启动问题 C_FORCE_ROOT environment

如果使用root用户启动celery会遇到下面的问题

python manage.py celery worker -c 4
System check identified some issues:

WARNINGS:
back_manage.Account.organization: (fields.W340) null has no effect on ManyToManyField.
back_manage.Account.st_post: (fields.W340) null has no effect on ManyToManyField.
back_manage.Crop.stage: (fields.W340) null has no effect on ManyToManyField.
back_manage.DevelopmentStage.grade: (fields.W340) null has no effect on ManyToManyField.
back_manage.OrganizationStrut.ws: (fields.W340) null has no effect on ManyToManyField.
back_manage.Post.menu: (fields.W340) null has no effect on ManyToManyField.
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

执行
export C_FORCE_ROOT=True
重新执行
python manage.py celery worker -c 4
System check identified some issues:

WARNINGS:
back_manage.Account.organization: (fields.W340) null has no effect on ManyToManyField.
back_manage.Account.st_post: (fields.W340) null has no effect on ManyToManyField.
back_manage.Crop.stage: (fields.W340) null has no effect on ManyToManyField.
back_manage.DevelopmentStage.grade: (fields.W340) null has no effect on ManyToManyField.
back_manage.OrganizationStrut.ws: (fields.W340) null has no effect on ManyToManyField.
back_manage.Post.menu: (fields.W340) null has no effect on ManyToManyField.
 
 -------------- celery@iZ8vbaeuxvbzsvnyblfbctZ v3.1.26.post2 (Cipater)
---- **** ----- 
--- * ***  * -- Linux-4.4.0-142-generic-x86_64-with-Ubuntu-16.04-xenial
-- * - **** --- 
- ** ---------- [config]
- ** ---------- .> app:         lot_case_demo:0x7fe250def190
- ** ---------- .> transport:   redis://:**@xxxxxxxxxxxxxxxxxxx/xx
- ** ---------- .> results:     
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- 
--- ***** ----- [queues]
 -------------- .> celery           exchange=celery(direct) key=celery
关注
打赏
1664870321
查看更多评论
立即登录/注册

微信扫码登录

0.1297s