celery trying shutdown worker by raising SystemExit in task_postrun signal but always hangs and the main process never exits

亡梦爱人 提交于 2019-12-03 14:16:07

Hate it when I end up answering my own question.

Anywhoo, it was blocking on a join call on the Mediator component inside the WorkController (calls stop() on the Mediator component, inside stop, it joins).

I got rid of the Mediator component by disabling all rate limits (should be this by default, but it's not for some reason).

You can disable all rate limits with the setting:

CELERY_DISABLE_ALL_RATE_LIMITS: True

Hope this helps somebody else down the road too.

Peace

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!