summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-02-12 11:52:32 -0800
committerBryan Newbold <bnewbold@archive.org>2021-02-12 11:52:32 -0800
commitbc66be001605454b48a36dd38bffee405bf469ab (patch)
tree9f49ebb37089501b153fac677fbf356c3213ab93
parent195d29b9b08082776406483a72a6bbb8e49d1b9c (diff)
downloadfatcat-scholar-bc66be001605454b48a36dd38bffee405bf469ab.tar.gz
fatcat-scholar-bc66be001605454b48a36dd38bffee405bf469ab.zip
more seaweedfs hacks
-rw-r--r--fatcat_scholar/work_pipeline.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/fatcat_scholar/work_pipeline.py b/fatcat_scholar/work_pipeline.py
index cb96274..282378b 100644
--- a/fatcat_scholar/work_pipeline.py
+++ b/fatcat_scholar/work_pipeline.py
@@ -171,6 +171,10 @@ class WorkPipeline:
# print(raw_text)
except minio.error.NoSuchKey:
return None
+ except urllib3.exceptions.MaxRetryError:
+ # HACK: work around broken seaweedfs keys
+ print(f"seaweedfs failure: sha1hex={fe.sha1}", file=sys.stderr)
+ return None
return dict(
raw_text=raw_text, release_ident=release_ident, file_ident=fe.ident,
)
@@ -202,6 +206,10 @@ class WorkPipeline:
# print(grobid_xml)
except minio.error.NoSuchKey:
return None
+ except urllib3.exceptions.MaxRetryError:
+ # HACK: work around broken seaweedfs keys
+ print(f"seaweedfs failure: sha1hex={fe.sha1}", file=sys.stderr)
+ return None
return dict(
html_meta=html_meta,