Skip to content
Snippets Groups Projects
Commit 5b7cb4aa authored by Nathan Hertz's avatar Nathan Hertz Committed by Nathan Hertz
Browse files

Modified DAG submission code to avoid an exception when no DAG file is

found
parent 2b824f59
No related branches found
No related tags found
1 merge request!504WS-677: Multi-stage workflow research & development
......@@ -447,10 +447,10 @@ class WorkflowService(WorkflowServiceIF):
logger.info("executing on folder %s", folder)
# some file in here should end in .dag; that file is our dagman input
dag_file = list(folder.glob("*.dag"))[0]
if dag_file:
logger.info("dagman file %s exists.", dag_file)
return self._submit_dag(folder, dag_file)
dag_files = list(folder.glob("*.dag"))
if dag_files:
logger.info("dagman file %s exists.", dag_files[0])
return self._submit_dag(folder, dag_files[0])
else:
job_file = list(folder.glob("*.condor"))[0]
logger.info("condor file %s exists.", job_file)
......@@ -496,7 +496,7 @@ class WorkflowService(WorkflowServiceIF):
# submit
logger.info("submitting DAG to condor...")
subprocess.run(
["condor_submit_dag", str(dag_file)],
["condor_submit_dag", "-f", str(dag_file)],
cwd=str(folder.absolute()),
preexec_fn=self._switch_to_submituser,
)
......
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