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,15 +27,17 @@ class JobsState:
|
||||||
def getJobsOnMachine( self, machineName ):
|
def getJobsOnMachine( self, machineName ):
|
||||||
jobsOnMachine = {}
|
jobsOnMachine = {}
|
||||||
for jobId, job in self.m_jobs.iteritems():
|
for jobId, job in self.m_jobs.iteritems():
|
||||||
if job.getSlots().get(machineName):
|
for queueMachineName, numSlots in job.getSlots().iteritems():
|
||||||
jobsOnMachine[ jobId ] = job
|
jobMachineName = queueMachineName.split('@')[1]
|
||||||
|
if jobMachineName == machineName:
|
||||||
|
jobsOnMachine[ jobId ] = job
|
||||||
return jobsOnMachine
|
return jobsOnMachine
|
||||||
|
|
||||||
def getNumFreeSlotsOnQueueMachine( self, queueMachine ):
|
def getNumFreeSlotsOnQueueMachine( self, queueMachine ):
|
||||||
#logInfo('getNumFreeSlotsOnQueueMachine : looking for free slots on queuemachine %s' % queueMachine.getName() )
|
#logInfo('getNumFreeSlotsOnQueueMachine : looking for free slots on queuemachine %s' % queueMachine.getName() )
|
||||||
numUsedSlots = 0
|
numUsedSlots = 0
|
||||||
for job in self.m_jobs.itervalues():
|
for job in self.m_jobs.itervalues():
|
||||||
numUsedSlotsByThisJob = job.getSlots().get( queueMachine.getMachineName() )
|
numUsedSlotsByThisJob = job.getSlots().get( queueMachine.getName() )
|
||||||
if numUsedSlotsByThisJob != None:
|
if numUsedSlotsByThisJob != None:
|
||||||
#logInfo('getNumFreeSlotsOnQueueMachine : job %d uses %d slots' % (job.getId().asStr(), numUsedSlotsByThisJob) )
|
#logInfo('getNumFreeSlotsOnQueueMachine : job %d uses %d slots' % (job.getId().asStr(), numUsedSlotsByThisJob) )
|
||||||
numUsedSlots += numUsedSlotsByThisJob
|
numUsedSlots += numUsedSlotsByThisJob
|
||||||
|
|
Loading…
Reference in New Issue