Skip to content

Commit

Permalink
Try to disable transaction helper
Browse files Browse the repository at this point in the history
If this does not break transactional state, this helper should be
removed completely.
  • Loading branch information
jdavcs committed Jan 8, 2025
1 parent 9e38cae commit 5f4090b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/galaxy/model/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ def transaction(session: Union[scoped_session, Session, "SessionlessContext"]):
yield
return # exit: can't use as a Session

if not session.in_transaction(): # type:ignore[union-attr]
with session.begin(): # type:ignore[union-attr]
yield
else:
yield
yield # TODO once we can verify this does not break SQLAlchemy transactions, remmove this helper completely (561 instances)
# if not session.in_transaction(): # type:ignore[union-attr]
# with session.begin(): # type:ignore[union-attr]
# yield
# else:
# yield


def check_database_connection(session):
Expand Down

0 comments on commit 5f4090b

Please sign in to comment.