From 56076db848459cb1da39b04dc635538ff013d3a9 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 26 Feb 2016 12:15:56 +0000 Subject: [PATCH] Disable command isolation for Pulsar... ... it builds its own job script - no need to have Galaxy do this isolation on the Galaxy end. The more Pulsar can handle the better. --- lib/galaxy/jobs/__init__.py | 9 ++++++++- lib/galaxy/jobs/runners/pulsar.py | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/jobs/__init__.py b/lib/galaxy/jobs/__init__.py index 4759fa8f1b4..be0577f90ae 100644 --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -768,6 +768,7 @@ class JobWrapper( object ): if use_persisted_destination: self.job_runner_mapper.cached_job_destination = JobDestination( from_job=job ) + self.__commands_in_new_shell = self.app.config.commands_in_new_shell self.__user_system_pwent = None self.__galaxy_system_pwent = None @@ -793,9 +794,15 @@ class JobWrapper( object ): def shell(self): return self.job_destination.shell or getattr(self.app.config, 'default_job_shell', DEFAULT_JOB_SHELL) + def disable_commands_in_new_shell(self): + """Provide an extension point to disable this isolation, + Pulsar builds its own job script so this is not needed for + remote jobs.""" + self.__commands_in_new_shell = False + @property def commands_in_new_shell(self): - return self.app.config.commands_in_new_shell + return self.__commands_in_new_shell @property def galaxy_lib_dir(self): diff --git a/lib/galaxy/jobs/runners/pulsar.py b/lib/galaxy/jobs/runners/pulsar.py index 62a1557d99c..6b33adc8deb 100644 --- a/lib/galaxy/jobs/runners/pulsar.py +++ b/lib/galaxy/jobs/runners/pulsar.py @@ -278,6 +278,7 @@ class PulsarJobRunner( AsynchronousJobRunner ): compute_tool_directory=remote_tool_directory, compute_job_directory=remote_job_directory, ) + job_wrapper.disable_commands_in_new_shell() command_line = build_command( self, job_wrapper=job_wrapper,