cocluto/ClusterController/QueueMachine.py

26 lines
695 B
Python

class QueueMachine:
"""
a QueueMachine instance represents a given SGE queue on a given machine (eg allintel.q@simpatix10)
"""
def __init__( self, queueName, machineName ):
self.m_queueName = queueName
self.m_machineName = machineName
self.m_numSlots = None
def getName( self ):
"""
returns the name of the machine queue (such as allintel.q@simpatix10)
"""
return self.m_queueName + '@' + self.m_machineName
def getQueueName( self ):
return self.m_queueName
def getMachineName( self ):
return self.m_machineName
def setNumSlots( self, numSlots ):
self.m_numSlots = numSlots
def getNumSlots( self ):
assert( self.m_numSlots != None )
return self.m_numSlots