Skip to content

armgit / mwmbl

Public Imported from GitHub
0

An open source, non-profit web search engine

Allow batches to fail silently

Daoud Clarke6ea3a95684ba
diff --git a/mwmbl/indexer/retrieve.py b/mwmbl/indexer/retrieve.py
index a79bbc8..6dda806 100644
--- a/mwmbl/indexer/retrieve.py
+++ b/mwmbl/indexer/retrieve.py
@@ -46,7 +46,7 @@ def retrieve_batch(url):
batch = HashedBatch.parse_obj(data)
except ValidationError:
print("Failed to validate batch", data)
- raise
+ return 0
if len(batch.items) > 0:
print(f"Retrieved batch with {len(batch.items)} items")
create_historical_batch(batch)