Raise JobMappingException when tool has been removed

That fixes the underlying problem in
https://github.com/galaxyproject/galaxy/issues/8141
but doesn't implement the outer try/except suggested
by @natefoo.
This commit is contained in:
mvdbeek
2019-06-18 17:53:36 +02:00
parent d0bf7c9767
commit 4c83abc41f
3 changed files with 8 additions and 0 deletions
+3
View File
@@ -1173,6 +1173,9 @@ class JobWrapper(HasResourceParameters):
"destination for completion of fail method", self.get_id_tag(), str(exc.failure_message))
self.job_runner_mapper.cached_job_destination = JobDestination(id='__fail__')
# Might be AssertionError or other exception
message = str(message)
# if the job was deleted, don't fail it
if not job.state == job.states.DELETED:
# Check if the failure is due to an exception
+4
View File
@@ -207,6 +207,10 @@ class JobRunnerMapper(object):
return job_destination
def __determine_job_destination(self, params, raw_job_destination=None):
if self.job_wrapper.tool is None:
raise JobMappingException(
"Can't map job to destination, tool '%s' is unavailable" % self.job_wrapper.get_job().tool_id
)
if raw_job_destination is None:
raw_job_destination = self.job_wrapper.tool.get_job_destination(params)
if raw_job_destination.runner == DYNAMIC_RUNNER_NAME:
@@ -1,4 +1,5 @@
import time
from base import integration_util
from base.populators import (
DatasetPopulator,