python– 运行eventlet池时Celery是否自动运行Monkey Patch?

python– 运行eventlet池时Celery是否自动运行Monkey Patch?,第1张

概述这是来自邮件列表的交叉帖子,希望能够更多地关注这个问题. (original post)当使用运行celery worker -p eventlet时,Celery会自动对我的代码进行猴子修补吗?docs没有提到任何关于必须进行修补的事情,official example也没有做任何明确的修补(即使gevent example也没有进行任何修补).修补程序自

这是来自邮件列表的交叉帖子,希望能够更多地关注这个问题. (original post)

当使用运行celery worker -p eventlet时,Celery会自动对我的代码进行猴子修补吗?

docs没有提到任何关于必须进行修补的事情,official example也没有做任何明确的修补(即使gevent example也没有进行任何修补).修补程序自动完成示例hints,但没有明确/明确的答案.最佳答案当您运行芹菜工作时,函数execute_from_commandline调用@L_502_6@调用_patch_eventlet,其执行:

def _patch_eventlet():    import eventlet    import eventlet.deBUG    eventlet.monkey_patch()    blockdetect = float(os.environ.get('EVENTLET_NOBLOCK',0))    if blockdetect:        eventlet.deBUG.hub_blocking_detection(blockdetect,blockdetect)
总结

以上是内存溢出为你收集整理的python – 运行eventlet池时Celery是否自动运行Monkey Patch?全部内容,希望文章能够帮你解决python – 运行eventlet池时Celery是否自动运行Monkey Patch?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1206435.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-04
下一篇 2022-06-04

发表评论

登录后才能评论

评论列表(0条)

保存