aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsbjørn Sloth Tønnesen <ast@a5n.dk>2024-11-07 21:50:31 +0000
committerAsbjørn Sloth Tønnesen <ast@a5n.dk>2024-11-07 21:50:31 +0000
commit477cba0fbc9dd0f98d9489db9e72b3461885a8d2 (patch)
treebe155f857c8dfd6616fc1f482789da19158f6a2a
parenta7611f3b46c69539473fba3c056d5002314299bc (diff)
downloadpeeringdb-simplesync-477cba0fbc9dd0f98d9489db9e72b3461885a8d2.tar.gz
peeringdb-simplesync-477cba0fbc9dd0f98d9489db9e72b3461885a8d2.tar.xz
peeringdb-simplesync-477cba0fbc9dd0f98d9489db9e72b3461885a8d2.zip
re-adjust request retry
Also trigger retry on 429, as initial sync might hit rate-limits, even when authenticated. Signed-off-by: Asbjørn Sloth Tønnesen <ast@a5n.dk>
-rwxr-xr-xsync.py4
1 files changed, 3 insertions, 1 deletions
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)