Fix: add missing db.session.close() to ensure proper session cleanup (#23122)

This commit is contained in:
Yongtao Huang
2025-07-30 10:34:24 +08:00
committed by GitHub
parent 0ea010d7ee
commit f17ca26b10
3 changed files with 5 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ def create_segment_to_index_task(segment_id: str, keywords: Optional[list[str]]
return
if segment.status != "waiting":
db.session.close()
return
indexing_cache_key = f"segment_{segment.id}_indexing"