From fd0cf6b55567e3081b9e57e2423d6d0e529ace41 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 9 Nov 2021 19:46:55 -0800 Subject: cleanups: add more state=active checks --- python/fatcat_tools/cleanups/file_release_bugfix.py | 4 ++++ python/fatcat_tools/cleanups/file_short_wayback_ts.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/python/fatcat_tools/cleanups/file_release_bugfix.py b/python/fatcat_tools/cleanups/file_release_bugfix.py index 6eb60205..5ac69d1a 100644 --- a/python/fatcat_tools/cleanups/file_release_bugfix.py +++ b/python/fatcat_tools/cleanups/file_release_bugfix.py @@ -131,6 +131,10 @@ class FileReleaseBugfix(EntityImporter): self.counts["skip-existing-not-found"] += 1 return False + if existing.state != "active": + self.counts["skip-existing-entity-state"] += 1 + return False + if wrong_release_ident not in existing.release_ids: self.counts["skip-existing-fixed"] += 1 return False diff --git a/python/fatcat_tools/cleanups/file_short_wayback_ts.py b/python/fatcat_tools/cleanups/file_short_wayback_ts.py index e2595912..bdd49f9b 100644 --- a/python/fatcat_tools/cleanups/file_short_wayback_ts.py +++ b/python/fatcat_tools/cleanups/file_short_wayback_ts.py @@ -119,6 +119,10 @@ class FileShortWaybackTimestampCleanup(EntityImporter): self.counts["skip-existing-not-found"] += 1 return False + if existing.state != "active": + self.counts["skip-existing-entity-state"] += 1 + return False + if existing.sha1 != fe.sha1: self.counts["skip-existing-mismatch"] += 1 return False -- cgit v1.2.3