Fix logging order in pipeline history trimming
This commit is contained in:
parent
d57fce1aac
commit
3059089e7d
1 changed files with 3 additions and 3 deletions
|
|
@ -1506,12 +1506,12 @@ class LightRAG:
|
||||||
|
|
||||||
# Prevent memory growth: keep only latest 5000 messages when exceeding 10000
|
# Prevent memory growth: keep only latest 5000 messages when exceeding 10000
|
||||||
if len(pipeline_status["history_messages"]) > 10000:
|
if len(pipeline_status["history_messages"]) > 10000:
|
||||||
pipeline_status["history_messages"] = (
|
|
||||||
pipeline_status["history_messages"][-5000:]
|
|
||||||
)
|
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Trimming pipeline history from {len(pipeline_status['history_messages'])} to 5000 messages"
|
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
|
# Get document content from full_docs
|
||||||
content_data = await self.full_docs.get_by_id(doc_id)
|
content_data = await self.full_docs.get_by_id(doc_id)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue