From 7a631b062246315f16f026ad65b86cef44952d1f Mon Sep 17 00:00:00 2001 From: jimboid Date: Wed, 11 Oct 2017 15:08:00 +0100 Subject: [PATCH] Issue #72 A fix for sub-queueing breaking when submitting a large number of quick to terminate jobs. --- longbow/corelibs/scheduling.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/longbow/corelibs/scheduling.py b/longbow/corelibs/scheduling.py index e3f1627..427e445 100755 --- a/longbow/corelibs/scheduling.py +++ b/longbow/corelibs/scheduling.py @@ -402,15 +402,21 @@ def submit(jobs): # Hit maximum slots on resource, Longbow will sub-schedule these. except exceptions.QueuemaxError: - LOG.info("The job '%s' has been held back by Longbow due to " - "reaching queue slot limit, it will be submitted when a " - "slot opens up.", item) + for item in jobs: - # We will set a flag so that we can inform the user that it is - # handled. - job["laststatus"] = "Waiting Submission" + if "laststatus" not in jobs[item]: - queued += 1 + LOG.info("The job '%s' has been held back by Longbow due " + "to reaching queue slot limit, it will be " + "submitted when a slot opens up.", item) + + # We will set a flag so that we can inform the user that + # it is handled. + jobs[item]["laststatus"] = "Waiting Submission" + + queued += 1 + + break # We want to find out what the maximum number of slots we have are. if int(QUEUEINFO[job["resource"]]["queue-slots"]) > \