From d75fca28771487e5469864289df3d72af21a2509 Mon Sep 17 00:00:00 2001 From: Marius van den Beek Date: Wed, 11 Mar 2026 13:56:43 +0100 Subject: [PATCH] Add check_database_connection to workflow scheduling path --- lib/galaxy/workflow/scheduling_manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/galaxy/workflow/scheduling_manager.py b/lib/galaxy/workflow/scheduling_manager.py index e28b04a7ea8..233decaa89b 100644 --- a/lib/galaxy/workflow/scheduling_manager.py +++ b/lib/galaxy/workflow/scheduling_manager.py @@ -16,6 +16,7 @@ import galaxy.workflow.schedulers from galaxy import model from galaxy.exceptions import HandlerAssignmentError from galaxy.jobs.handler import InvocationGrabber +from galaxy.model.base import check_database_connection from galaxy.schema.invocation import ( FailureReason, InvocationFailureDatasetFailed, @@ -431,6 +432,7 @@ class WorkflowRequestMonitor(Monitors): def __attempt_schedule(self, invocation_id, workflow_scheduler): with self.app.model.context() as session: + check_database_connection(session) workflow_invocation = session.get(model.WorkflowInvocation, invocation_id) if workflow_invocation.state == workflow_invocation.states.REQUIRES_MATERIALIZATION: if not self.__attempt_materialize(workflow_invocation, session):