From 3059089e7d0ef9bc7599e3fa04ccd1cf46c5fc8b Mon Sep 17 00:00:00 2001 From: yangdx Date: Mon, 8 Sep 2025 23:00:44 +0800 Subject: [PATCH] Fix logging order in pipeline history trimming --- lightrag/lightrag.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index 03699e08..55731d7a 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -1506,12 +1506,12 @@ class LightRAG: # Prevent memory growth: keep only latest 5000 messages when exceeding 10000 if len(pipeline_status["history_messages"]) > 10000: - pipeline_status["history_messages"] = ( - pipeline_status["history_messages"][-5000:] - ) logger.info( f"Trimming pipeline history from {len(pipeline_status['history_messages'])} to 5000 messages" ) + pipeline_status["history_messages"] = ( + pipeline_status["history_messages"][-5000:] + ) # Get document content from full_docs content_data = await self.full_docs.get_by_id(doc_id)