Skip to content
Snippets Groups Projects
Commit 15e5f84b authored by Karim Ahmed's avatar Karim Ahmed
Browse files

Merge branch 'fix/add_dep_before_deletion' into 'master'

delete file only after finishing all jobs

See merge request detectors/pycalibration!251
parents 8381d16c a630ab79
No related branches found
No related tags found
1 merge request!251delete file only after finishing all jobs
...@@ -157,8 +157,10 @@ async def build_dc_report(dc_folder, report_fmt): ...@@ -157,8 +157,10 @@ async def build_dc_report(dc_folder, report_fmt):
if "Submitted batch job " in line: if "Submitted batch job " in line:
jobid = line.split(" ")[3] jobid = line.split(" ")[3]
logging.info("Submitted job for building a report: {}".format(jobid)) logging.info("Submitted job for building a report: {}".format(jobid))
await wait_jobs([jobid])
asyncio.ensure_future(del_folder("{}/slurm-{}.out".format(temp_path, jobid))) await asyncio.wait_for(wait_jobs([jobid]), timeout=7200) # timeout=2hours
# delete folder only after the pending slurm jobs finishes
await del_folder("{}/slurm-{}.out".format(temp_path, jobid))
async def push_figures(repo_master, addf): async def push_figures(repo_master, addf):
......
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