Skip to content

Commit 443aab2

Browse files
committed
修复当出现异常时,会导致更新数据卡死的bug
1 parent 63bd066 commit 443aab2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lightrag/lightrag.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,8 @@ async def ainsert(
469469
error_msg = f"Failed to process document {doc_id}: {str(e)}\n{traceback.format_exc()}"
470470
logger.error(error_msg)
471471
continue
472-
473-
finally:
474-
# Ensure all indexes are updated after each document
472+
else:
473+
# Only update index when processing succeeds
475474
await self._insert_done()
476475

477476
def insert_custom_chunks(self, full_text: str, text_chunks: list[str]):

0 commit comments

Comments
 (0)