diff options
author | Asbjørn Sloth Tønnesen <ast@a5n.dk> | 2024-11-07 21:50:31 +0000 |
---|---|---|
committer | Asbjørn Sloth Tønnesen <ast@a5n.dk> | 2024-11-07 21:50:31 +0000 |
commit | 477cba0fbc9dd0f98d9489db9e72b3461885a8d2 (patch) | |
tree | be155f857c8dfd6616fc1f482789da19158f6a2a | |
parent | a7611f3b46c69539473fba3c056d5002314299bc (diff) | |
download | peeringdb-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-x | sync.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) |