Skip to content

Commit 91199d1

Browse files
committed
add job.output feature
1 parent 0523aec commit 91199d1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

jobrunner/cli/_commands.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def setup(workdir_list, show):
6464

6565
# Run setup
6666
print(f"Running setup")
67-
subprocess.run(f"bash job.setup", shell=True, check=True)
67+
subprocess.run(f"bash job.setup | tee job.output", shell=True, check=True)
6868

6969
# Return to base directory
7070
os.chdir(basedir)
@@ -199,6 +199,12 @@ def clean(workdir_list):
199199
check=True,
200200
)
201201

202+
process = subprocess.run(
203+
f'rm -vf {workdir + "/" + "job.output"}',
204+
shell=True,
205+
check=True,
206+
)
207+
202208

203209
@jobrunner.command(name="archive")
204210
@click.option(

jobrunner/lib/_archivetools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def CreateArchive(main_dict, archive_tag):
5656
nodedir + os.sep + "job.input",
5757
nodedir + os.sep + "job.setup",
5858
nodedir + os.sep + "job.submit",
59+
nodedir + os.sep + "job.output",
5960
]
6061

6162
# loop over list of files in nodedir

0 commit comments

Comments
 (0)