gpt4 book ai didi

python - 如何设置celery生产者发送任务超时

转载 作者:太空宇宙 更新时间:2023-11-03 20:42:02 27 4
gpt4 key购买 nike

我尝试了 broker_connection_timeout 设置,但似乎不是我所期望的。文档 here ,说道:

"The broker connection timeout only applies to a worker attempting to connect to the broker. It does not apply to producer sending a task, see broker_transport_options for how to provide a timeout for that situation."

但直到现在我仍然找不到正确的broker_transport_optionsRabbitMQsend_task设置超时。请帮忙,谢谢!

最佳答案

尝试这个配置

BROKER_TRANSPORT_OPTIONS = {"max_retries": 3, "interval_start": 0, "interval_step": 0.2, "interval_max": 0.5}

https://github.com/celery/celery/issues/4627#issuecomment-396907957

关于python - 如何设置celery生产者发送任务超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56805193/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com