From 477cba0fbc9dd0f98d9489db9e72b3461885a8d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= Date: Thu, 7 Nov 2024 21:50:31 +0000 Subject: re-adjust request retry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also trigger retry on 429, as initial sync might hit rate-limits, even when authenticated. Signed-off-by: Asbjørn Sloth Tønnesen --- sync.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sync.py b/sync.py index 1450663..5543265 100755 --- a/sync.py +++ b/sync.py @@ -170,7 +170,9 @@ def main(): open_db() s = requests.Session() - retries = Retry(total=5, backoff_factor=1, status_forcelist=[ 502, 503, 504 ]) + retries = Retry(total=16, + backoff_factor=1.5, + status_forcelist=[ 429, 502, 503, 504 ]) s.mount('https://', HTTPAdapter(max_retries=retries)) handle_auth(s) -- cgit v1.2.1