diff options
author | Bryan Newbold <bnewbold@archive.org> | 2022-09-14 21:15:51 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2022-09-14 21:15:51 -0700 |
commit | 032eb7b5598efe4f01e59684de9cef96c358554f (patch) | |
tree | 4d62f43c50e0e43d5406265ca3f801484db49751 | |
parent | 2c19b7180e83c70411516c63b8dced5429b450f4 (diff) | |
download | sandcrawler-032eb7b5598efe4f01e59684de9cef96c358554f.tar.gz sandcrawler-032eb7b5598efe4f01e59684de9cef96c358554f.zip |
spn2: fix tests by not retrying on HTTP 500
-rw-r--r-- | python/sandcrawler/ia.py | 4 |
1 files changed, 3 insertions, 1 deletions
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", |