From 032eb7b5598efe4f01e59684de9cef96c358554f Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 14 Sep 2022 21:15:51 -0700 Subject: spn2: fix tests by not retrying on HTTP 500 --- python/sandcrawler/ia.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/sandcrawler/ia.py b/python/sandcrawler/ia.py index 8c8e59e..657bee6 100644 --- a/python/sandcrawler/ia.py +++ b/python/sandcrawler/ia.py @@ -964,7 +964,9 @@ class SavePageNowClient: self.ia_access_key = kwargs.get("ia_access_key", os.environ.get("IA_ACCESS_KEY")) self.ia_secret_key = kwargs.get("ia_secret_key", os.environ.get("IA_SECRET_KEY")) self.v2endpoint = v2endpoint - self.v2_session = requests_retry_session(retries=5, backoff_factor=3) + self.v2_session = requests_retry_session( + retries=5, backoff_factor=3, status_forcelist=[502, 504] + ) self.v2_session.headers.update( { "User-Agent": "Mozilla/5.0 sandcrawler.SavePageNowClient", -- cgit v1.2.3