mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 20:39:03 +08:00
ignore when save image fail (#2178)
### What problem does this PR solve? ### Type of change - [x] Performance Improvement
This commit is contained in:
parent
5400467da1
commit
fc6d8ee77f
@ -206,6 +206,7 @@ def build(row):
|
|||||||
docs.append(d)
|
docs.append(d)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
try:
|
||||||
output_buffer = BytesIO()
|
output_buffer = BytesIO()
|
||||||
if isinstance(d["image"], bytes):
|
if isinstance(d["image"], bytes):
|
||||||
output_buffer = BytesIO(d["image"])
|
output_buffer = BytesIO(d["image"])
|
||||||
@ -215,6 +216,10 @@ def build(row):
|
|||||||
st = timer()
|
st = timer()
|
||||||
MINIO.put(row["kb_id"], d["_id"], output_buffer.getvalue())
|
MINIO.put(row["kb_id"], d["_id"], output_buffer.getvalue())
|
||||||
el += timer() - st
|
el += timer() - st
|
||||||
|
except Exception as e:
|
||||||
|
cron_logger.error(str(e))
|
||||||
|
traceback.print_exc()
|
||||||
|
|
||||||
d["img_id"] = "{}-{}".format(row["kb_id"], d["_id"])
|
d["img_id"] = "{}-{}".format(row["kb_id"], d["_id"])
|
||||||
del d["image"]
|
del d["image"]
|
||||||
docs.append(d)
|
docs.append(d)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user