aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-02-06 11:58:13 -0800
committerBryan Newbold <bnewbold@robocracy.org>2020-02-06 11:58:15 -0800
commiteac269a36d648db8712eb4fda4c0a896d5f4dcbc (patch)
tree84838b68ce4641dd7fe52c937cb848515f65e2df /python
parent88edf4cb81a5afd7f469358eaee73affa75c72c2 (diff)
downloadfatcat-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.
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_tools/importers/ingest.py3
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