1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-02 17:56:15 +01:00

connection: Wait between retries

This commit is contained in:
Daniel Mach 2023-02-09 09:32:25 +01:00
parent 6341983e79
commit 2f6b50ec2b

View File

@ -217,7 +217,7 @@ def http_request(method: str, url: str, headers=None, data=None, file=None):
pool = CONNECTION_POOLS.get(apiurl, None) pool = CONNECTION_POOLS.get(apiurl, None)
if not pool: if not pool:
pool_kwargs = {} pool_kwargs = {}
pool_kwargs["retries"] = urllib3.Retry(total=int(conf.config["http_retries"])) pool_kwargs["retries"] = urllib3.Retry(total=int(conf.config["http_retries"]), backoff_factor=2)
if purl.scheme == "https": if purl.scheme == "https":
ssl_context = oscssl.create_ssl_context() ssl_context = oscssl.create_ssl_context()