Copernicus  2.0
 All Classes Namespaces Files Functions Variables
cpc.command.command.Command Class Reference
Inheritance diagram for cpc.command.command.Command:
cpc.server.queue.cmdqueue.QueueableItem

Public Member Functions

def setTask
 
def getDir
 
def tryGenID
 
def getID
 
def addArg
 
def getArgs
 
def getArgStr
 
def addEnv
 
def getEnv
 
def getOutputFiles
 
def addOutputFile
 
def addFile
 
def getFiles
 
def setRunning
 
def getRunning
 
def getWorkerServer
 
def getReturncode
 
def setReturncode
 
def addCputime
 
def setCputime
 
def getCputime
 
def addMinRequired
 
def getMinRequired
 
def getAllMinRequired
 
def addMaxAllowed
 
def getMaxAllowed
 
def getAllMaxAllowed
 
def resetReserved
 
def addReserved
 
def setReserved
 
def getReserved
 
def hasReserved
 
def joinReserved
 
def getTask
 
def getFullPriority
 
def increasePriority
 
def writeXML
 
def toJSON
 
def writeWorkerXML
 
- Public Member Functions inherited from cpc.server.queue.cmdqueue.QueueableItem
def deactivate
 
def activate
 
def setQueue
 

Public Attributes

 dir
 
 executable
 
 inputFiles
 
 outputFiles
 
 args
 
 minVersion
 
 maxVersion
 
 addPriority
 
 task
 
 running
 
 id
 
 workerServer
 
 returncode
 
 cputime
 
 reserved
 
 minRequired
 
 maxAllowed
 
 env
 
- Public Attributes inherited from cpc.server.queue.cmdqueue.QueueableItem
 active
 
 queue
 
 cmdQueue
 

Detailed Description

A command is what is executed on runners. Each task that is emitted
   by the controller is broken up in commands (using the task plugins).

Member Function Documentation

def cpc.command.command.Command.addArg (   self,
  arg 
)
def cpc.command.command.Command.addCputime (   self,
  cputime 
)
Add a number of cpu seconds used.
def cpc.command.command.Command.addEnv (   self,
  name,
  value 
)
Add a single environment variable.
def cpc.command.command.Command.addFile (   self,
  file 
)
Add a commandInputFile object
def cpc.command.command.Command.addMaxAllowed (   self,
  rsrc 
)
Add a single max. allowed resource.
   rsrc = the resource object
def cpc.command.command.Command.addMinRequired (   self,
  rsrc 
)
Add a single required resource.
   rsrc = the resource object
def cpc.command.command.Command.addOutputFile (   self,
  filename 
)
Add a file name to the list of output files that this command may
   generate. The file name is relative to the run directory, and 
   does not include the standard 'stdout' and 'stderr'
def cpc.command.command.Command.addReserved (   self,
  rsrc 
)
Add a resource to the reserved list.
def cpc.command.command.Command.getAllMaxAllowed (   self)
Get the dict with all max. allowed resources.
def cpc.command.command.Command.getAllMinRequired (   self)
Get the dict with all required resources.
def cpc.command.command.Command.getArgs (   self)
def cpc.command.command.Command.getArgStr (   self)
def cpc.command.command.Command.getCputime (   self)
Return the amount of cpu seconds used for this command.
def cpc.command.command.Command.getDir (   self)
def cpc.command.command.Command.getEnv (   self)
Get the dict of environment values (or None if none set)
def cpc.command.command.Command.getFiles (   self)
Get the file names
def cpc.command.command.Command.getFullPriority (   self)
def cpc.command.command.Command.getID (   self)
Return the ID.
def cpc.command.command.Command.getMaxAllowed (   self,
  name 
)
Get the value for a max. allowed resource.
   returns: the resource object or None if it is not found.
def cpc.command.command.Command.getMinRequired (   self,
  name 
)
Get the value for a required resource.
   returns: the resource object or None if it is not found.
def cpc.command.command.Command.getOutputFiles (   self)
Get the list of all possible relevant output files this command 
   generates.
def cpc.command.command.Command.getReserved (   self,
  name 
)
Get the value for a reserved resource.
   returns: the resource object or None if it is not found.
def cpc.command.command.Command.getReturncode (   self)
Set the latest return code.
def cpc.command.command.Command.getRunning (   self)
Return whether the command is running.
def cpc.command.command.Command.getTask (   self)
def cpc.command.command.Command.getWorkerServer (   self)
Get the server name of the server the worker is connected to.
def cpc.command.command.Command.hasReserved (   self,
  name 
)
def cpc.command.command.Command.increasePriority (   self)
def cpc.command.command.Command.joinReserved (   self,
  other 
)
Join a reservation list from another command.
def cpc.command.command.Command.resetReserved (   self)
Reset the list of reserved resources from the required resources.
def cpc.command.command.Command.setCputime (   self,
  cputime 
)
Set a number of cpu seconds used.
def cpc.command.command.Command.setReserved (   self,
  name,
  value 
)
Add a resource to the reserved list.
def cpc.command.command.Command.setReturncode (   self,
  returncode 
)
Set the latest return code.
def cpc.command.command.Command.setRunning (   self,
  running,
  workerServer = None 
)
Set the command to a running (or not) state.
   running = boolean indicating the running state
   workerServer = the server name of the server the worker is 
          connected to.
def cpc.command.command.Command.setTask (   self,
  task 
)
def cpc.command.command.Command.toJSON (   self)
def cpc.command.command.Command.tryGenID (   self)
Generate an ID if it doesn't already have one.
def cpc.command.command.Command.writeWorkerXML (   self,
  outf 
)
Write an XML description of the command to the file outf.
   If restriction==True, it won't write project and task information.
def cpc.command.command.Command.writeXML (   self,
  outf,
  indent = 0 
)
Write an XML description of the command to the file outf.
   This XML is for the controller.

Member Data Documentation

cpc.command.command.Command.addPriority
cpc.command.command.Command.args
cpc.command.command.Command.cputime
cpc.command.command.Command.dir
cpc.command.command.Command.env
cpc.command.command.Command.executable
cpc.command.command.Command.id
cpc.command.command.Command.inputFiles
cpc.command.command.Command.maxAllowed
cpc.command.command.Command.maxVersion
cpc.command.command.Command.minRequired
cpc.command.command.Command.minVersion
cpc.command.command.Command.outputFiles
cpc.command.command.Command.reserved
cpc.command.command.Command.returncode
cpc.command.command.Command.running
cpc.command.command.Command.task
cpc.command.command.Command.workerServer

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