diff --git a/lib/galaxy/jobs/handler.py b/lib/galaxy/jobs/handler.py index e654423f2713..92beb0b4f1a0 100644 --- a/lib/galaxy/jobs/handler.py +++ b/lib/galaxy/jobs/handler.py @@ -1216,12 +1216,16 @@ def get_job_runner(self, job_wrapper, get_task_runner=False): except KeyError: log.error(f"({job_wrapper.job_id}) Invalid job runner: {runner_name}") job_wrapper.fail(DEFAULT_JOB_RUNNER_FAILURE_MESSAGE) + return None if get_task_runner and job_wrapper.can_split() and runner.runner_name != "PulsarJobRunner": return self.job_runners["tasks"] return runner def put(self, job_wrapper): runner = self.get_job_runner(job_wrapper, get_task_runner=True) + if runner is None: + # Something went wrong, we've already failed the job wrapper + return if isinstance(job_wrapper, TaskWrapper): # DBTODO Refactor log.debug(f"({job_wrapper.job_id}) Dispatching task {job_wrapper.task_id} to task runner")