Skip to content

Commit

Permalink
Merge pull request #176 from djgroen/ignore-run_prefix-onremote-machine
Browse files Browse the repository at this point in the history
ignore executing run_prefix on remote machine
  • Loading branch information
djgroen committed Mar 12, 2020
2 parents 6e85cf9 + 9b4e7fb commit 5cb6f01
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions base/fab.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,13 +654,22 @@ def job(sweep_length=1, *option_dictionaries):
print("job dispatch is done locally\n")

elif not env.get("noexec", False):
with cd(job_results_dir[threading.get_ident()]
['job_results']):
with prefix(env.run_prefix):
run(
template("$job_dispatch %s" % job_results_dir[
threading.get_ident()]['dest_name'])
)
if env.remote == 'localhost':
with cd(job_results_dir[threading.get_ident()]
['job_results']):
with prefix(env.run_prefix):
run(
template("$job_dispatch %s" %
job_results_dir[
threading.get_ident()]
['dest_name'])
)
else:
run(
template("$job_dispatch %s" %
job_results_dir[threading.get_ident()]
['dest_name'])
)

print("JOB OUTPUT IS STORED REMOTELY IN: %s:%s " %
(env.remote,
Expand Down

0 comments on commit 5cb6f01

Please sign in to comment.