diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2020-02-06 11:58:13 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2020-02-06 11:58:15 -0800 |
commit | eac269a36d648db8712eb4fda4c0a896d5f4dcbc (patch) | |
tree | 84838b68ce4641dd7fe52c937cb848515f65e2df | |
parent | 88edf4cb81a5afd7f469358eaee73affa75c72c2 (diff) | |
download | fatcat-eac269a36d648db8712eb4fda4c0a896d5f4dcbc.tar.gz fatcat-eac269a36d648db8712eb4fda4c0a896d5f4dcbc.zip |
ingest worker: handle missing ingest_request_source
Seeing a bunch of these due to re-ingests not including this field
because of an earlier persist bug.
-rw-r--r-- | python/fatcat_tools/importers/ingest.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python/fatcat_tools/importers/ingest.py b/python/fatcat_tools/importers/ingest.py index bdfd2835..17dafe91 100644 --- a/python/fatcat_tools/importers/ingest.py +++ b/python/fatcat_tools/importers/ingest.py @@ -54,6 +54,9 @@ class IngestFileResultImporter(EntityImporter): self.counts['skip-hit'] += 1 return False source = row['request'].get('ingest_request_source') + if not source: + self.counts['skip-ingest_request_source'] += 1 + return False if self.ingest_request_source_whitelist and source not in self.ingest_request_source_whitelist: self.counts['skip-ingest_request_source'] += 1 return False |