From 04e7348866ed01e890572650951fd1e7fed108e7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 15 Jul 2022 14:12:58 -0700 Subject: spn2: handle case of re-attempting a recent crawl (race condition) --- python/sandcrawler/ia.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/python/sandcrawler/ia.py b/python/sandcrawler/ia.py index bb67c87..51326fa 100644 --- a/python/sandcrawler/ia.py +++ b/python/sandcrawler/ia.py @@ -1084,6 +1084,20 @@ class SavePageNowClient: and "You have already reached the limit of active sessions" in resp_json["message"] ): raise SavePageNowBackoffError(resp_json["message"]) + elif ( + resp_json + and "message" in resp_json + and "The same snapshot had been made" in resp_json["message"] + ): + return SavePageNowResult( + False, + "spn2-recent-capture", + None, + request_url, + None, + None, + None, + ) elif resp_json.get("status") == "error": return SavePageNowResult( False, -- cgit v1.2.3