Skip to content

Commit

Permalink
Merge pull request #17179 from jdavcs/dev_sa20_session_future
Browse files Browse the repository at this point in the history
Add future=True flag to SA session
  • Loading branch information
mvdbeek authored Dec 14, 2023
2 parents b922495 + 4fcf474 commit 9e68497
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5895,7 +5895,7 @@ def update_parent_folder_update_times(self):
WHERE exists (SELECT 1 FROM parent_folders_of
WHERE library_folder.id = parent_folders_of.folder_id)
"""
).execution_options(autocommit=True)
)

with object_session(self).bind.connect() as conn, conn.begin():
ret = conn.execute(sql, {"library_dataset_id": ldda.library_dataset_id, "ldda_id": ldda.id})
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/model/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def transaction(session: Union[scoped_session, Session, "SessionlessContext"]):
class ModelMapping(Bunch):
def __init__(self, model_modules, engine):
self.engine = engine
self._SessionLocal = sessionmaker(autoflush=False, autocommit=False)
self._SessionLocal = sessionmaker(autoflush=False, autocommit=False, future=True)
versioned_session(self._SessionLocal)
context = scoped_session(self._SessionLocal, scopefunc=self.request_scopefunc)
# For backward compatibility with "context.current"
Expand Down

0 comments on commit 9e68497

Please sign in to comment.