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

Class WorkerBrain

Loggable --+
           |
          WorkerBrain


I manage jobs and everything related. I live in the main worker process.
Method Summary
  __init__(self, options)
  deferredStartCreate(self, avatarId)
Create and register a deferred for starting up the given component.
  deferredStartFailed(self, avatarId, exception)
Notify the caller that a start has failed, and remove the start from the list of pending starts.
  deferredStartTrigger(self, avatarId)
Trigger a previously registered deferred for starting up the given component.
  error(self, message)
  installSIGTERMHandler(self)
Install our own signal handler for SIGTERM.
  login(self, keycard)
  setup(self)
  teardown(self)
Clean up after setup()
  _SIGTERMHandler(self, signum, frame)
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
  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.
  warningFailure(self, failure)
Log a warning about a Failure.

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

Method Details

__init__(self, options)
(Constructor)

Parameters:
options - the optparsed dictionary of command-line options
           (type=an object with attributes)

deferredStartCreate(self, avatarId)

Create and register a deferred for starting up the given component. This deferred will be fired when the JobAvatar has instructed the job to start the component.

deferredStartFailed(self, avatarId, exception)

Notify the caller that a start has failed, and remove the start from the list of pending starts.

deferredStartTrigger(self, avatarId)

Trigger a previously registered deferred for starting up the given component.

installSIGTERMHandler(self)

Install our own signal handler for SIGTERM. This will call the currently installed one first, then shut down jobs.

teardown(self)

Clean up after setup()
Returns:
a twisted.internet.defer.Deferred that fires when the teardown is completed

Class Variable Details

logCategory

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

Generated by Epydoc 2.1 on Tue Dec 20 15:33:10 2005 http://epydoc.sf.net