Skip to content

Commit

Permalink
Merge pull request #17315 from mvdbeek/backport_23.2_pendingrollbacke…
Browse files Browse the repository at this point in the history
…rror2

[23.2] Backport Rollback invalidated transaction: catch them earlier
  • Loading branch information
jdavcs authored Jan 17, 2024
2 parents b3d31bf + a4d0c33 commit b9ba44b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/galaxy/jobs/runners/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
job_script,
write_script,
)
from galaxy.model.base import transaction
from galaxy.model.base import (
check_database_connection,
transaction,
)
from galaxy.tool_util.deps.dependencies import (
JobInfo,
ToolInfo,
Expand Down Expand Up @@ -829,6 +832,7 @@ def monitor(self):
pass
# Iterate over the list of watched jobs and check state
try:
check_database_connection(self.sa_session)
self.check_watched_items()
except Exception:
log.exception("Unhandled exception checking active jobs")
Expand Down
1 change: 0 additions & 1 deletion lib/galaxy/jobs/runners/pulsar.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ def url_to_destination(self, url):
return JobDestination(runner="pulsar", params=url_to_destination_params(url))

def check_watched_item(self, job_state):
check_database_connection(self.app.model.session())
if self.use_mq:
# Might still need to check pod IPs.
job_wrapper = job_state.job_wrapper
Expand Down

0 comments on commit b9ba44b

Please sign in to comment.