deal db session in celery worker (#17549)
This commit is contained in:
parent
da7f8ad936
commit
c8145ce581
26 changed files with 104 additions and 25 deletions
|
|
@ -74,3 +74,5 @@ def batch_clean_document_task(document_ids: list[str], dataset_id: str, doc_form
|
|||
)
|
||||
except Exception:
|
||||
logging.exception("Cleaned documents when documents deleted failed")
|
||||
finally:
|
||||
db.session.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue