Skip to content
Snippets Groups Projects

Release 2.0

Merged Loraine Gueguen requested to merge release_2.0 into dev
+ 13
13
@@ -209,19 +209,19 @@ class LoadData(speciesData.SpeciesData):
logging.info("Waiting for import jobs to finish... please wait")
# Checking job state (only necessary if ran using SLURM)
# while True:
# try:
# # "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",
# shell=True)
# if not len(ret):
# break
# time.sleep(3)
# except subprocess.CalledProcessError as inst:
# if inst.returncode == 153: # queue is empty
# break
# else:
# raise
while True:
try:
# "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",
shell=True)
if not len(ret):
break
time.sleep(3)
except subprocess.CalledProcessError as inst:
if inst.returncode == 153: # queue is empty
break
else:
raise
time.sleep(10)
Loading