Skip to content
Snippets Groups Projects
Commit 14eac2c8 authored by Loraine Gueguen's avatar Loraine Gueguen
Browse files

comment checking job state

parent e9abe404
No related branches found
No related tags found
2 merge requests!10Release 2.0,!9Release 2.0 (merge dev to master)
...@@ -206,25 +206,25 @@ class LoadData(speciesData.SpeciesData): ...@@ -206,25 +206,25 @@ class LoadData(speciesData.SpeciesData):
time.sleep(1) time.sleep(1)
# Wait for uploads to complete # # Wait for uploads to complete
logging.info("Waiting for import jobs to finish... please wait") # logging.info("Waiting for import jobs to finish... please wait")
#
# Checking job state (only necessary if ran using SLURM) # # Checking job state (only necessary if ran using SLURM)
while True: # while True:
try: # try:
# "C" state means the job is completed, no need to wait for it # # "C" state means the job is completed, no need to wait for it
ret = subprocess.check_output("squeue | grep -v \"C debug\" | grep -v \"JOBID\" || true", # ret = subprocess.check_output("squeue | grep -v \"C debug\" | grep -v \"JOBID\" || true",
shell=True) # shell=True)
if not len(ret): # if not len(ret):
break # break
time.sleep(3) # time.sleep(3)
except subprocess.CalledProcessError as inst: # except subprocess.CalledProcessError as inst:
if inst.returncode == 153: # queue is empty # if inst.returncode == 153: # queue is empty
break # break
else: # else:
raise # raise
#
time.sleep(10) # time.sleep(10)
# Batch renaming --> Throws a critical error at the moment # Batch renaming --> Throws a critical error at the moment
# logging.info("Import finished, now renaming datasets with pretty names") # logging.info("Import finished, now renaming datasets with pretty names")
......
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