mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
refactor(api): use sessionmaker in workflow & RAG pipeline services (#34805)
This commit is contained in:
1 parent
c19a822e1b
commit
be1f4b34f8
3 files changed
+5
-10
No files matched your search
@@ -1075,9 +1075,8 @@ class DraftVariableSaver:
|
||||
)
|
||||
engine = bind = self._session.get_bind()
|
||||
assert isinstance(engine, Engine)
|
||||
with Session(bind=engine, expire_on_commit=False) as session:
|
||||
with sessionmaker(bind=engine, expire_on_commit=False).begin() as session:
|
||||
session.add(variable_file)
|
||||
session.commit()
|
||||
|
||||
return truncation_result.result, variable_file
|
||||
|
||||
|
||||
Reference in new issue
Block a user