RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Refactor: Improve the try logic for upload_to_minio (#9735)
Stephen Huc461261f0b69
diff --git a/rag/svr/task_executor.py b/rag/svr/task_executor.pyindex 078d4f296a..e9151b70d9 100644--- a/rag/svr/task_executor.py+++ b/rag/svr/task_executor.py@@ -293,8 +293,7 @@ async def build_chunks(task, progress_callback):docs.append(d)return- output_buffer = BytesIO()- try:+ with BytesIO() as output_buffer:if isinstance(d["image"], bytes):output_buffer.write(d["image"])output_buffer.seek(0)@@ -317,8 +316,6 @@ async def build_chunks(task, progress_callback):d["image"].close()del d["image"] # Remove image referencedocs.append(d)- finally:- output_buffer.close() # Ensure BytesIO is always closedexcept Exception:logging.exception("Saving image of chunk {}/{}/{} got exception".format(task["location"], task["name"], d["id"]))