Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23.2] Backport Rollback invalidated transaction: catch them earlier #17315

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading