Skip to content

Commit f8ca816

Browse files
committed
check links retries
1 parent cb1871f commit f8ca816

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/check_links.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
MAGENTA = '\033[95m'
2222
RESET = '\033[0m'
2323

24+
RETRY_TOTAL = 10
25+
RETRY_CONNECT = 5
26+
2427
TIMEOUT = 10
2528
VALID_RET = [
2629
200,
@@ -57,7 +60,9 @@ def get_session():
5760
"""get a session with retry"""
5861
session = requests.Session()
5962
retry_on = [404, 429, 500, 502, 503, 504]
60-
retry = Retry(total=3,
63+
retry = Retry(total=RETRY_TOTAL,
64+
connect=RETRY_CONNECT,
65+
status=RETRY_CONNECT,
6166
backoff_factor=1,
6267
allowed_methods=False,
6368
status_forcelist=retry_on)

0 commit comments

Comments
 (0)