Skip to content

Commit

Permalink
Store submit command args in designated workflow directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
Krishna Chilleri - 389395 committed Feb 8, 2024
1 parent e0bc3f2 commit f43c3a2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions beeflow/client/bee_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from beeflow.common.parser import CwlParser
from beeflow.common.wf_data import generate_workflow_id
from beeflow.client import core
from beeflow.wf_manager.resources import wf_utils

# Length of a shortened workflow ID
short_id_len = 6 #noqa: Not a constant
Expand Down Expand Up @@ -281,6 +282,20 @@ def is_parent(parent, path):
if tarball_path:
os.remove(tarball_path)

# Store provided arguments in text file for future reference
wf_dir = wf_utils.get_workflow_dir(wf_id)
sub_wf_dir = wf_dir + "/submit_command_args.txt"

f = open(sub_wf_dir, "w")
f.write("beeflow submit wf_name wf_path main_cwl yaml workdir\n")
f.write("wf_name: " + str(wf_name) + "\n")
f.write("wf_path: " + str(wf_path) + "\n")
f.write("main_cwl: " + str(main_cwl) + "\n")
f.write("yaml: " + str(yaml) + "\n")
f.write("workdir: " + str(workdir) + "\n")
f.write("wf_id: " + str(wf_id))
f.close()

return wf_id


Expand Down

0 comments on commit f43c3a2

Please sign in to comment.