Diable expire_on_commit in the implemention of the WorkflowNodeExecut… (#18321)

Co-authored-by: lizb <lizb@sugon.com>
This commit is contained in:
Ganondorf 2025-04-17 21:09:19 +08:00 committed by GitHub
parent b287aaccec
commit 721294948c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,7 +36,7 @@ class SQLAlchemyWorkflowNodeExecutionRepository:
"""
# If an engine is provided, create a sessionmaker from it
if isinstance(session_factory, Engine):
self._session_factory = sessionmaker(bind=session_factory)
self._session_factory = sessionmaker(bind=session_factory, expire_on_commit=False)
else:
self._session_factory = session_factory