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
commit f17ca26b10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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"