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

Class WorkerBrain

Loggable --+
           |
          WorkerBrain


I am the main object in the worker process, managing jobs and everything related. I live in the main worker process.
Method Summary
  __init__(self, options)
  callRemote(self, methodName, *args, **kwargs)
twisted.internet.defer.Deferred 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)
  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.

Instance Variable Summary
JobHeaven jobHeaven:  
flumotion.common.keycards.Keycard keycard: the keycard the worker used to log in to the manager
Kindergarten kindergarten:  
WorkerMedium medium:  
WorkerClientFactory workerClientFactory:  

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.
Returns:
twisted.internet.defer.Deferred

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

Instance Variable Details

jobHeaven

Type:
JobHeaven

keycard

the keycard the worker used to log in to the manager
Type:
flumotion.common.keycards.Keycard

kindergarten

Type:
Kindergarten

medium

Type:
WorkerMedium

workerClientFactory

Type:
WorkerClientFactory

Class Variable Details

logCategory

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

Generated by Epydoc 2.1 on Sun Oct 22 03:16:45 2006 http://epydoc.sf.net