From 443aab2882a5ddca2fc86eac3ac0c6616362eef2 Mon Sep 17 00:00:00 2001 From: Magic_yuan <317617749@qq.com> Date: Fri, 24 Jan 2025 10:15:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BD=93=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=97=B6=EF=BC=8C=E4=BC=9A=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE=E5=8D=A1=E6=AD=BB=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lightrag/lightrag.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index edec85f1..f36f73b0 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -469,9 +469,8 @@ class LightRAG: error_msg = f"Failed to process document {doc_id}: {str(e)}\n{traceback.format_exc()}" logger.error(error_msg) continue - - finally: - # Ensure all indexes are updated after each document + else: + # Only update index when processing succeeds await self._insert_done() def insert_custom_chunks(self, full_text: str, text_chunks: list[str]):