Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pipeliner: explicitly set dispatcher work dir in PipelineTask.resolve…
Browse files Browse the repository at this point in the history
…_dependencies.
pjbriggs committed Nov 10, 2023
1 parent 254efd4 commit d318d17
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions auto_process_ngs/pipeliner.py
Original file line number Diff line number Diff line change
@@ -3157,6 +3157,15 @@ def resolve_dependencies(self,enable_conda=False,conda=None,
conda_env_dir = conda_wrapper.env_dir
env_name = self.conda_env_name
conda_env = os.path.join(conda_env_dir,env_name)
# Set up dispatcher to run function calls
dispatcher_working_dir = "dispatcher.resolve_deps.%s" % \
env_name
if working_dir:
working_dir = os.path.join(working_dir,
dispatcher_working_dir)
else:
working_dir = dispatcher_working_dir
d = Dispatcher(working_dir=working_dir)
try:
# Quick check if the environment exists
# NB don't lock the conda env dir for this check to
@@ -3170,7 +3179,6 @@ def resolve_dependencies(self,enable_conda=False,conda=None,
# Try and create the environment
self.report("acquiring new conda environment '%s'..." %
env_name)
d = Dispatcher()
cmd = d.dispatch_function_cmd(make_conda_env,
conda,
env_name,
@@ -3183,17 +3191,14 @@ def resolve_dependencies(self,enable_conda=False,conda=None,
# Validate existing environment
self.report("checking existing conda environment '%s'..." %
env_name)
d = Dispatcher()
cmd = d.dispatch_function_cmd(check_conda_env,
conda,
env_name,
env_dir=conda_env_dir,
timeout=timeout)
# Always run as local job
runner = SimpleJobRunner()
# Sort out directories
if working_dir is None:
working_dir = os.getcwd()
# Sort out scripts and log directories
if scripts_dir is None:
scripts_dir = working_dir
if log_dir is None:

0 comments on commit d318d17

Please sign in to comment.