Copernicus  2.0
 All Classes Namespaces Files Functions Variables
cpc.server.state.heartbeat.RunningCmdList Class Reference
Inheritance diagram for cpc.server.state.heartbeat.RunningCmdList:

Public Member Functions

def startHeartbeatThread
 
def add
 
def remove
 
def handleFinished
 
def getCmdList
 
def ping
 
def toJSON
 
def readState
 
def writeState
 
def checkHeartbeatTimes
 

Public Attributes

 conf
 
 cmdQueue
 
 runningCommands
 
 workerData
 
 lock
 
 thread
 

Static Public Attributes

int rateLimitTime = 5
 

Detailed Description

Maintains a list of all running commands owned by this server, for
   which periodic heartbeat signals are expected.

Member Function Documentation

def cpc.server.state.heartbeat.RunningCmdList.add (   self,
  cmds,
  workerServer,
  heartbeatInterval 
)
Add a set of commands sent to a specific worker.
def cpc.server.state.heartbeat.RunningCmdList.checkHeartbeatTimes (   self,
  interval 
)
Check the heartbeat times and deal with dead jobs. 
   interval = the max. heartbeat interval
   Returns the time of the first heartbeat expiry.
def cpc.server.state.heartbeat.RunningCmdList.getCmdList (   self)
Return a list with all running commands as command objects.
def cpc.server.state.heartbeat.RunningCmdList.handleFinished (   self,
  cmdID,
  returncode,
  cputime,
  runfile 
)
Handle a finished command (successful or otherwise), with optional
   runfile
   cmd = the command to remove
   returncode = the return code
   runfile = None or a file handle to the tarfile containing run data
def cpc.server.state.heartbeat.RunningCmdList.ping (   self,
  workerID,
  workerDir,
  iteration,
  heartbeatItems,
  isLocal,
  faultyItems 
)
Handle a heartbeat signal from a worker (possibly relayed)
  
   workerID = the sending worker's ID
   workerDir = the sending worker's run directory 
   iteration = the sending workers' claimed iteration
   heartbeatItems = the hearbeat items describing commands.
   isLocal = a boolean that is true when the worker server is this 
     server
   faultyItems = a list containing faulty heartbeat items
def cpc.server.state.heartbeat.RunningCmdList.readState (   self)
def cpc.server.state.heartbeat.RunningCmdList.remove (   self,
  cmd 
)
Remove a command from the list, or throw a HeartbeatListError
   if no such command.
   cmd = a command object to remove.
def cpc.server.state.heartbeat.RunningCmdList.startHeartbeatThread (   self)
def cpc.server.state.heartbeat.RunningCmdList.toJSON (   self)
def cpc.server.state.heartbeat.RunningCmdList.writeState (   self)

Member Data Documentation

cpc.server.state.heartbeat.RunningCmdList.cmdQueue
cpc.server.state.heartbeat.RunningCmdList.conf
cpc.server.state.heartbeat.RunningCmdList.lock
int cpc.server.state.heartbeat.RunningCmdList.rateLimitTime = 5
static
cpc.server.state.heartbeat.RunningCmdList.runningCommands
cpc.server.state.heartbeat.RunningCmdList.thread
cpc.server.state.heartbeat.RunningCmdList.workerData

The documentation for this class was generated from the following file: