Skip to content

Commit 8eb8d09

Browse files
committed
Stop skipping existing, retry one by one.
1 parent 8bc7e1d commit 8eb8d09

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/ingest.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def on_success(datasets):
7878
logger.info("Ingested %s", dataset)
7979
info = Info.from_path(dataset.path.geturl())
8080
logger.debug("%s", info)
81-
success_refs.extend(dataset.refs)
8281
with r.pipeline() as pipe:
8382
pipe.lrem(worker_queue, 0, info.path)
8483
pipe.hset(f"FILE:{info.path}", "ingest_time", str(time.time()))
@@ -257,13 +256,17 @@ def main():
257256
logger.info("Ingesting %s", resources)
258257
success_refs = []
259258
try:
260-
success_refs = ingester.run(
261-
resources, skip_existing_exposures=True
262-
)
259+
success_refs = ingester.run(resources)
263260
except RuntimeError:
264261
pass
265262
except Exception:
266263
logger.exception("Error while ingesting %s", resources)
264+
# Retry one by one
265+
for resource in resources:
266+
try:
267+
success_refs.extend(ingester.run([resource]))
268+
except Exception:
269+
logger.exception("Error while ingesting %s", resource)
267270

268271
# Define visits if we ingested anything
269272
if not is_lfa and success_refs:

0 commit comments

Comments
 (0)