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)
  callRemote(self, methodName, *args, **kwargs)
  deferredCreate(self, avatarId)
Create and register a deferred for creating the given component.
  deferredCreateFailed(self, avatarId, exception)
Notify the caller that a create has failed, and remove the create from the list of pending creates.
  deferredCreateRegistered(self, avatarId)
Check if a deferred create has been registered for the given avatarId.
  deferredCreateTrigger(self, avatarId)
Trigger a previously registered deferred for creating 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()
    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.
    Inherited from Loggable
Implements __implemented__ = <implementedBy flumotion.common.log.Lo...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...

Method Details

__init__(self, options)
(Constructor)

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

deferredCreate(self, avatarId)

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

deferredCreateFailed(self, avatarId, exception)

Notify the caller that a create has failed, and remove the create from the list of pending creates.

deferredCreateRegistered(self, avatarId)

Check if a deferred create has been registered for the given avatarId.

deferredCreateTrigger(self, avatarId)

Trigger a previously registered deferred for creating 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 Wed Sep 13 13:38:33 2006 http://epydoc.sf.net