We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
2 parents363bc87 +4060146 commit114958eCopy full SHA for 114958e
gitlab/client.py
@@ -700,10 +700,14 @@ def http_request(
700
if (429==result.status_codeandobey_rate_limit)or (
701
result.status_codein [500,502,503,504]andretry_transient_errors
702
):
703
+# Response headers documentation:
704
+# https://docs.gitlab.com/ee/user/admin_area/settings/user_and_ip_rate_limits.html#response-headers
705
ifmax_retries==-1orcur_retries<max_retries:
706
wait_time=2**cur_retries*0.1
707
if"Retry-After"inresult.headers:
708
wait_time=int(result.headers["Retry-After"])
709
+elif"RateLimit-Reset"inresult.headers:
710
+wait_time=int(result.headers["RateLimit-Reset"])-time.time()
711
cur_retries+=1
712
time.sleep(wait_time)
713
continue