Skip to content
Snippets Groups Projects
Commit c7cc08a2 authored by John Chilton's avatar John Chilton
Browse files

Home directory handling breaks when updating Galaxy to latest pulsar-galaxy-lib.

parent 82d49fcb
No related branches found
No related tags found
3 merge requests!44Try to fix CI.,!38Generalize orchestrated container scheduling.,!22update Pulsar to 0.15.3
......@@ -42,6 +42,9 @@ class RemoteJobDirectory:
else:
self.job_directory = remote_staging_directory
def home_directory(self):
return self._sub_dir('home')
def metadata_directory(self):
return self._sub_dir('metadata')
......
......@@ -160,9 +160,10 @@ class DirectoryBaseManager(BaseManager):
'galaxy_lib': self._galaxy_lib(),
'preserve_python_environment': setup_params.get('preserve_galaxy_python_environment', False),
'env_setup_commands': env_setup_commands,
'job_directory': self.job_directory(job_id).job_directory,
# job_diredctory not used by job_script and it calls the job directory working directory
'working_directory': self.job_directory(job_id).working_directory(),
'metadata_directory': self.job_directory(job_id).metadata_directory(),
'home_directory': self.job_directory(job_id).home_directory(),
'job_id': job_id,
'tmp_dir_creation_statement': self._tmp_dir(job_id),
}
......
......@@ -5,7 +5,7 @@ $headers
_galaxy_setup_environment() {
local _use_framework_galaxy="$1"
_GALAXY_JOB_DIR="$working_directory"
_GALAXY_JOB_HOME_DIR="$working_directory/home"
_GALAXY_JOB_HOME_DIR="$home_directory"
_GALAXY_JOB_TMP_DIR=$tmp_dir_creation_statement
$env_setup_commands
if [ "$GALAXY_LIB" != "None" -a "$_use_framework_galaxy" = "True" ]; then
......
......@@ -93,6 +93,9 @@ def job_script(template=DEFAULT_JOB_FILE_TEMPLATE, **kwds):
kwds["instrument_pre_commands"] = job_instrumenter.pre_execute_commands(working_directory) or ""
kwds["instrument_post_commands"] = job_instrumenter.post_execute_commands(working_directory) or ""
# Setup home directory var
kwds["home_directory"] = kwds.get("home_directory", os.path.join(kwds["working_directory"], "home"))
template_params = OPTIONAL_TEMPLATE_PARAMS.copy()
template_params.update(**kwds)
env_setup_commands_str = "\n".join(template_params["env_setup_commands"])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment