Package flumotion :: Package worker :: Module worker :: Class WorkerBrain
[hide private]

Class WorkerBrain

source code

extern.log.log.Loggable --+
                          |
                         WorkerBrain

I am the main object in the worker process, managing jobs and everything related. I live in the main worker process.

Instance Methods [hide private]
 
__init__(self, options) source code
 
_installHUPHandler(self) source code
 
listen(self)
Start listening on FeedServer (incoming eater requests) and JobServer (through which we communicate with our children) ports
source code
 
_makeFeedServer(self)
Returns: flumotion.worker.feedserver.FeedServer
source code
 
login(self, managerConnectionInfo) source code
 
callRemote(self, methodName, *args, **kwargs) source code
 
shutdownHandler(self) source code
 
feedToFD(self, componentId, feedName, fd, eaterId)
Called from the FeedAvatar to pass a file descriptor on to the job running the component for this feeder.
source code
 
eatFromFD(self, componentId, eaterAlias, fd, feedId)
Called from the FeedAvatar to pass a file descriptor on to the job running the given component.
source code
 
getPorts(self) source code
 
getFeedServerPort(self) source code
 
create(self, avatarId, type, moduleName, methodName, nice, conf) source code
 
runCheck(self, module, function, *args, **kwargs) source code
 
getComponents(self) source code
 
killJob(self, avatarId, signum) source code

Inherited from extern.log.log.Loggable: __providedBy__, debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

Class Variables [hide private]
  logCategory = 'workerbrain'
Implementors can provide a category to log their messages under.
  __implemented__ = <implementedBy flumotion.worker.worker.Worke...
  __provides__ = <zope.interface.declarations.ClassProvides obje...
Instance Variables [hide private]
  authenticator
authenticator worker used to log in to manager @type authenticator flumotion.twisted.pb.Authenticator
job.CheckJobHeaven checkHeaven
int feedServerPort
TCP port the Feed Server is listening on
job.ComponentJobHeaven jobHeaven
medium.WorkerMedium medium
medium.WorkerClientFactory workerClientFactory
Method Details [hide private]

__init__(self, options)
(Constructor)

source code 
Parameters:
  • options (an object with attributes) - the optparsed dictionary of command-line options

listen(self)

source code 

Start listening on FeedServer (incoming eater requests) and JobServer (through which we communicate with our children) ports

Returns:
True if we successfully listened on both ports

_makeFeedServer(self)

source code 
Returns:
flumotion.worker.feedserver.FeedServer

feedToFD(self, componentId, feedName, fd, eaterId)

source code 

Called from the FeedAvatar to pass a file descriptor on to the job running the component for this feeder.

Returns:
whether the fd was successfully handed off to the component.

eatFromFD(self, componentId, eaterAlias, fd, feedId)

source code 

Called from the FeedAvatar to pass a file descriptor on to the job running the given component.

Returns:
whether the fd was successfully handed off to the component.

Class Variable Details [hide private]

__implemented__

Value:
<implementedBy flumotion.worker.worker.WorkerBrain>

__provides__

Value:
<zope.interface.declarations.ClassProvides object at 0xa96c52c>