Scientific.DistributedComputing.MasterSlave.SlaveProcess

Package Scientific :: Package DistributedComputing :: Module MasterSlave :: Class SlaveProcess |
[frames] | no frames]

# Class SlaveProcess

    object --+
             |
            SlaveProcess

Slave process in a master-slave setup

A concrete slave process in a program is implemented by subclassing this class and adding the methods that handle the computational tasks. Such a method has the name "do_" followed by the tag of the computational task. The process is then launched by calling the method "start".

Instance Methods
__init__(self, label, master_host=None, watchdog_period=120.0) x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
processParameter(self, parameter) |
start(self, namespace=None) Starts the slave process. |
terminationTest(self) |
watchdogThread(self) This method is run in a separate thread that pings the master process regularly to signal that it is still alive. |
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, label, master_host=None, watchdog_period=120.0) (Constructor) |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Parameters: `label` (`str`) - the label that identifies the task manager `master_host` (`str` or `NoneType`) - If `None` (default), the task manager of the master process is located using the Pyro name server. If no name server is used, this parameter must be the hostname of the machine on which the master process runs, plus the port number if it is different from the default (7766). `watchdog_period` (`int` or `NoneType`) - the interval (in seconds) at which the slave process sends messages to the manager to signal that it is still alive. If None, no messages are sent at all. In that case, the manager cannot recognize if the slave job has crashed or been killed. Overrides: object.__init__