diff options
author | Bryan Newbold <bnewbold@archive.org> | 2022-07-15 14:12:58 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2022-07-15 14:12:58 -0700 |
commit | 04e7348866ed01e890572650951fd1e7fed108e7 (patch) | |
tree | a1b790b8dd43e5ee644a2cdd1fd9a24f7bdff938 | |
parent | b10105cbf74f87acf417dfea9e324b1dbff3b8ec (diff) | |
download | sandcrawler-04e7348866ed01e890572650951fd1e7fed108e7.tar.gz sandcrawler-04e7348866ed01e890572650951fd1e7fed108e7.zip |
spn2: handle case of re-attempting a recent crawl (race condition)
-rw-r--r-- | python/sandcrawler/ia.py | 14 |
1 files changed, 14 insertions, 0 deletions
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, |