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

@@ -113,3 +113,5 @@ def document_indexing_sync_task(dataset_id: str, document_id: str):
logging.info(click.style(str(ex), fg="yellow"))
except Exception:
logging.exception("document_indexing_sync_task failed, document_id: %s", document_id)
finally:
db.session.close()