Package flumotion :: Package worker :: Module job :: Class ComponentJobHeaven
[hide private]

Class ComponentJobHeaven

source code

 twisted.spread.jelly.Jellyable --+                
                                  |                
twisted.spread.flavors.Serializable --+            
                                      |            
   twisted.spread.flavors.Referenceable --+        
                                          |        
                twisted.spread.flavors.Root --+    
                                              |    
                    extern.log.log.Loggable --+    
                                              |    
                             base.BaseJobHeaven --+
                                                  |
                                                 ComponentJobHeaven

Nested Classes [hide private]
  avatarClass
Instance Methods [hide private]
flumotion.common.connection.PBConnectionInfo
getManagerConnectionInfo(self)
Gets the flumotion.common.connection.PBConnectionInfo describing how to connect to the manager.
source code
 
spawn(self, avatarId, type, moduleName, methodName, nice, bundles, conf)
Spawn a new job.
source code

Inherited from base.BaseJobHeaven: __init__, addJobInfo, getJobInfo, getJobInfos, getJobPids, getWorkerName, jobStopped, kill, killJob, killJobByPid, listen, removeAvatar, requestAvatar, rotateChildLogFDs, shutdown

Inherited from twisted.spread.flavors.Root: rootObject

Inherited from twisted.spread.flavors.Referenceable: jellyFor, remoteMessageReceived

Inherited from twisted.spread.flavors.Serializable: processUniqueID

Inherited from twisted.spread.jelly.Jellyable: __providedBy__, getStateFor

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

Class Variables [hide private]

Inherited from base.BaseJobHeaven: __implemented__, __provides__, logCategory

Inherited from twisted.spread.flavors.Referenceable: perspective

Instance Variables [hide private]

Inherited from base.BaseJobHeaven: avatars, brain

Method Details [hide private]

spawn(self, avatarId, type, moduleName, methodName, nice, bundles, conf)

source code 

Spawn a new job.

This will spawn a new flumotion-job process, running under the requested nice level. When the job logs in, it will be told to load bundles and run a function, which is expected to return a component.

Parameters:
  • avatarId (str) - avatarId the component should use to log in
  • type (str) - type of component to start
  • moduleName (str) - name of the module to create the component from
  • methodName (str) - the factory method to use to create the component
  • nice (int) - nice level
  • bundles (list of (str, str)) - ordered list of (bundleName, bundlePath) for this component
  • conf (dict) - component configuration