在 RetryParams 文档中,有 min_retries 和 max_retries 参数。我可以理解有 max_retries 参数,但不确定有 min_retries 的意义是什么。文档 ( https://cloud.google.com/appengine/docs/python/googlecloudstorageclient/retryparams_class ) 显示以下内容:
min_retries
The minimum number of times to retry.
max_retries
The maximum number of times to retry. Set this value to 0 if you don't want any retries.
如果我将 max_retries 设置为 10,我希望如果连接反复失败,它最多会尝试 10 次。为什么需要 min_retries 参数?什么时候会发挥作用?
最佳答案
从该文档页面:
max_retry_period
The maximum number of seconds that can be spent on all retries of a given request. Retry stops when this period passed AND min_retries has been attempted.
关于python - RetryParams 的 min_retries 的目的是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27785855/