Commit 6574775b authored by Paul Rich's avatar Paul Rich
Browse files

Adding in early break on final node addition.

This is a pretty common check so this should be a cheap optimization for
us.
parent 25d01a9b
......@@ -828,6 +828,8 @@ class CraySystem(BaseSystem):
for nid in node_id_list:
if nid not in ret_nids:
ret_nids.append(nid)
if len(ret_nids) >= int(job['nodes']):
break
return ret_nids[:int(job['nodes'])]
def _associate_and_run_immediate(self, job, resource_until_time, node_id_list):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment