Skip to content
Snippets Groups Projects
Commit aecb38b4 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 6621fa25
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !504. Comments created here will be created in the context of that merge request.
......@@ -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