Skip to content

Commit

Permalink
Merge pull request #18070 from jdavcs/24.0_pendingrollback_rsrepo
Browse files Browse the repository at this point in the history
[24.0] Check database connection to issue a rollback if no connection
  • Loading branch information
mvdbeek authored Apr 30, 2024
2 parents f237455 + 724e795 commit 6ed6843
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/galaxy/tool_shed/util/repository_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
from sqlalchemy.orm import joinedload

from galaxy import util
from galaxy.model.base import transaction
from galaxy.model.base import (
check_database_connection,
transaction,
)
from galaxy.model.scoped_session import install_model_scoped_session
from galaxy.model.tool_shed_install import ToolShedRepository
from galaxy.tool_shed.util import basic_util
Expand Down Expand Up @@ -283,6 +286,7 @@ def get_installed_repository(
Return a tool shed repository database record defined by the combination of a toolshed, repository name,
repository owner and either current or originally installed changeset_revision.
"""
check_database_connection(app.install_model.context)
# We store the port, if one exists, in the database.
tool_shed = common_util.remove_protocol_from_tool_shed_url(tool_shed)
if from_cache:
Expand Down

0 comments on commit 6ed6843

Please sign in to comment.