From 225c7ecabb2170214a356bda9f7b32d4b621f728 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Thu, 13 Apr 2023 21:59:12 +0200 Subject: [PATCH] add backoff factor --- lib/WPExport.py | 4 ++-- lib/WPImport.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/WPExport.py b/lib/WPExport.py index 9d58600..fffc32a 100644 --- a/lib/WPExport.py +++ b/lib/WPExport.py @@ -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)) diff --git a/lib/WPImport.py b/lib/WPImport.py index 2ecdfc6..8c4a8b1 100644 --- a/lib/WPImport.py +++ b/lib/WPImport.py @@ -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))