Skip to content

Commit 5b6dd34

Browse files
bruno-garbaccioarnaudfroidmont
authored andcommitted
update queue status in autoscale_slurm.sh
Adding option "-r" in getJobs() to get all jobs in squeue in case of a job array
1 parent d96beb5 commit 5b6dd34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoscaling/crontab/autoscale_slurm.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def getTopology(clusterName):
4141
# Get the list of Jobs in all states
4242
def getJobs():
4343
# changing the position of Dependency as it is giving blank instead of null. to handle that, putting it at the end.
44-
out = subprocess.Popen(['squeue','-O','STATE,JOBID,FEATURE:100,NUMNODES,Partition,UserName,Dependency'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
44+
out = subprocess.Popen(['squeue','-r','-O','STATE,JOBID,FEATURE:100,NUMNODES,Partition,UserName,Dependency'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
4545
stdout,stderr = out.communicate()
4646
return stdout.split("\n")[1:]
4747

@@ -433,4 +433,4 @@ try:
433433

434434
except Exception:
435435
traceback.print_exc()
436-
os.remove(lockfile)
436+
os.remove(lockfile)

0 commit comments

Comments
 (0)