diff --git a/lib/galaxy/jobs/runners/__init__.py b/lib/galaxy/jobs/runners/__init__.py index bb5d61ad603..3849b2299d8 100644 --- a/lib/galaxy/jobs/runners/__init__.py +++ b/lib/galaxy/jobs/runners/__init__.py @@ -423,6 +423,7 @@ class BaseJobRunner(object): def fail_job(self, job_state, exception=False): if getattr(job_state, 'stop_job', True): self.stop_job(job_state.job_wrapper) + job_state.job_wrapper.reclaim_ownership() self._handle_runner_state('failure', job_state) # Not convinced this is the best way to indicate this state, but # something necessary diff --git a/test/unit/jobs/test_runner_local.py b/test/unit/jobs/test_runner_local.py index d65f6ac2335..acaafbc5557 100644 --- a/test/unit/jobs/test_runner_local.py +++ b/test/unit/jobs/test_runner_local.py @@ -213,3 +213,6 @@ class MockJobWrapper(object): def home_directory(self): return None + + def reclaim_ownership(self): + pass