add backoff factor

This commit is contained in:
Valentin CZERYBA 2023-04-13 21:59:12 +02:00
parent 1311ef2ff2
commit 225c7ecabb
2 changed files with 4 additions and 4 deletions

View File

@ -14,8 +14,8 @@ class WPExport:
self._request = requests.Session()
retries = Retry(total=5,
status_forcelist=[429, 500, 502, 503, 504])
retries = Retry(total=10,
status_forcelist=[429, 500, 502, 503, 504], backoff_factor=2)
self._request.mount('http://', HTTPAdapter(max_retries=retries))

View File

@ -16,8 +16,8 @@ class WPimport:
self._request = requests.Session()
retries = Retry(total=5,
status_forcelist=[429, 500, 502, 503, 504])
retries = Retry(total=10,
status_forcelist=[429, 500, 502, 503, 504], backoff_factor=2)
self._request.mount('http://', HTTPAdapter(max_retries=retries))