Pyro_service
Pyro service process management.
Use this module to manage a pyro service.
Classes
-
class servermgr.pyro_service.Manager(service_name, service, ns_host, ns_port, process_name='Pyro Service', **kwargs)[source]
Pyro service manager object.
Parameters: |
- service_name – the Pyro service name for this module.
- service – The object used to handle Pyro requests.
- ns_host – Pyro nameserver host.
- ns_port (int) – Pyro nameserver port.
|
-
health()[source]
Check the health of the Pyro Server.
Raises : | base.WorkerError if we cannot invoke the health method of the Pyro Server. |
-
process
Return the process object.
-
ready_wait(timeout=10.0, verbose=False)
Wait until the worker subprocess is responding to requests.
Parameters: |
- timeout (float, seconds) – Give the server this many seconds to start. If the
timeout expires before the server has started,
kill the server and raise WorkerError.
|
Raises : | WorkerError if the worker is not ready within the time limit.
|
Raises : | WorkerError if there is no subprocess.
|
-
start(wait=True, timeout=10.0)[source]
Launch the Pyro Service in a fresh python environment.
Parameters: |
- host – the nameserver host
- port (int) – the nameserver port
- process_name – the displayed program name;
- module_name – execute function ‘main’ in the named module;
|
-
stop(wait=True)
Terminate the worker subprocess.
Parameters: |
- wait (boolean) – If True, wait for the worker to exit.
|
-
wait()
Wait for the worker process to exit.