Package flumotion :: Package worker :: Module worker :: Class Kindergarten
[show private | hide private]
[frames | no frames]

Class Kindergarten

Loggable --+
           |
          Kindergarten


I spawn job processes. I live in the worker brain.
Method Summary
  __init__(self, options)
  getKid(self, avatarId)
  getKids(self)
  play(self, avatarId, type, config)
Create a kid and make it "play" by starting a job.
boolean removeKidByPid(self, pid)
Remove the kid from the kindergarten based on the pid.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, message)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.

Class Variable Summary
str logCategory: Implementors can provide a category to log their messages under.

Method Details

__init__(self, options)
(Constructor)

Parameters:
options - the optparse option instance of command-line options
           (type=dict)

play(self, avatarId, type, config)

Create a kid and make it "play" by starting a job. Starts a component with the given name, of the given type, and the given config dictionary.
Parameters:
avatarId - avatarId the component should use to log in
           (type=string)
type - type of component to start
           (type=string)
config - a configuration dictionary for the component
           (type=dict)

removeKidByPid(self, pid)

Remove the kid from the kindergarten based on the pid. Called by the signal handler in the brain.
Returns:
whether or not a kid with that pid was removed
           (type=boolean)

Class Variable Details

logCategory

Implementors can provide a category to log their messages under.
Type:
str
Value:
'workerbrain'                                                          

Generated by Epydoc 2.1 on Wed Feb 16 07:23:00 2005 http://epydoc.sf.net