mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Use requests.gte in get_gh_api
This commit is contained in:
parent
346e8a0162
commit
c5ebd6f072
@ -77,7 +77,7 @@ def get_gh_api(
|
||||
while retry <= retries:
|
||||
try:
|
||||
retry += 1
|
||||
response = get_with_retries(url, 1, sleep, **kwargs)
|
||||
response = requests.get(url, **kwargs)
|
||||
response.raise_for_status()
|
||||
return response
|
||||
except requests.HTTPError as e:
|
||||
@ -93,6 +93,12 @@ def get_gh_api(
|
||||
)
|
||||
set_auth_header()
|
||||
retry = 1
|
||||
elif retry < retries:
|
||||
time.sleep(sleep)
|
||||
except Exception as e:
|
||||
exc = e
|
||||
if retry < retries:
|
||||
time.sleep(sleep)
|
||||
|
||||
raise exc
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user