correction d'un bug introduit dans le commit 2034 (je crois) : les slots sont désormais par queuemachine, et non pas machine
This commit is contained in:
parent
319c78dd86
commit
265aac6064
|
@ -27,7 +27,9 @@ class JobsState:
|
|||
def getJobsOnMachine( self, machineName ):
|
||||
jobsOnMachine = {}
|
||||
for jobId, job in self.m_jobs.iteritems():
|
||||
if job.getSlots().get(machineName):
|
||||
for queueMachineName, numSlots in job.getSlots().iteritems():
|
||||
jobMachineName = queueMachineName.split('@')[1]
|
||||
if jobMachineName == machineName:
|
||||
jobsOnMachine[ jobId ] = job
|
||||
return jobsOnMachine
|
||||
|
||||
|
@ -35,7 +37,7 @@ class JobsState:
|
|||
#logInfo('getNumFreeSlotsOnQueueMachine : looking for free slots on queuemachine %s' % queueMachine.getName() )
|
||||
numUsedSlots = 0
|
||||
for job in self.m_jobs.itervalues():
|
||||
numUsedSlotsByThisJob = job.getSlots().get( queueMachine.getMachineName() )
|
||||
numUsedSlotsByThisJob = job.getSlots().get( queueMachine.getName() )
|
||||
if numUsedSlotsByThisJob != None:
|
||||
#logInfo('getNumFreeSlotsOnQueueMachine : job %d uses %d slots' % (job.getId().asStr(), numUsedSlotsByThisJob) )
|
||||
numUsedSlots += numUsedSlotsByThisJob
|
||||
|
|
Loading…
Reference in New Issue