问题记录
celery启动后报错:
CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine whether broker connection retries are made during startup in Celery 6.0 and above. If you wish to retain the existing behavior for retrying connections on startup, you should set broker_connection_retry_on_startup to True. warnings.warn(

解决方案
添加配置 :BROKER_CONNECTION_RETRY_ON_STARTUP=True
celery = Celery(__name__, broker=Config.BROKER_URL, backend=Config.RESULT_BACKEND,BROKER_CONNECTION_RETRY_ON_STARTUP=True)
文章讲述了在升级到Celery6.0及以上版本时,遇到关于连接重试警告的问题。解决方法是通过设置BROKER_CONNECTION_RETRY_ON_STARTUP为True。给出的代码示例展示了如何在Celery初始化时添加此配置。
1041

被折叠的 条评论
为什么被折叠?



