Skip to content

Commit

Permalink
2 small simplifications in JobWrapper
Browse files Browse the repository at this point in the history
After commit eeb1dae,
`JobWrapper.job_destination()` does not call
`self._job_dataset_path_rewriter()` any more.
  • Loading branch information
nsoranzo committed Nov 17, 2018
1 parent 0ddc5ae commit 183d84e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/galaxy/jobs/__init__.py
Expand Up @@ -1178,11 +1178,7 @@ def get_destination_configuration(self, key, default=None):
""" Get a destination parameter that can be defaulted back
in app.config if it needs to be applied globally.
"""
# this is called by self._job_dataset_path_rewriter, which is called by self.job_destination(), so to access
# self.job_destination directly would cause infinite recursion
dest_params = {}
if hasattr(self, 'job_runner_mapper') and hasattr(self.job_runner_mapper, 'cached_job_destination'):
dest_params = self.job_runner_mapper.cached_job_destination.params
dest_params = self.job_destination.params
return self.get_job().get_destination_configuration(
dest_params, self.app.config, key, default
)
Expand Down Expand Up @@ -1487,9 +1483,9 @@ def path_rewriter(path):
param_dict.update({'__collected_datasets__': collected_datasets})
# Certain tools require tasks to be completed after job execution
# ( this used to be performed in the "exec_after_process" hook, but hooks are deprecated ).
self.tool.exec_after_process(self.queue.app, inp_data, out_data, param_dict, job=job)
self.tool.exec_after_process(self.app, inp_data, out_data, param_dict, job=job)
# Call 'exec_after_process' hook
self.tool.call_hook('exec_after_process', self.queue.app, inp_data=inp_data,
self.tool.call_hook('exec_after_process', self.app, inp_data=inp_data,
out_data=out_data, param_dict=param_dict,
tool=self.tool, stdout=job.stdout, stderr=job.stderr)
job.command_line = unicodify(self.command_line)
Expand Down

0 comments on commit 183d84e

Please sign in to comment.