pb_client.autostart ¶
Starting a service on demand.
Two clients running at once may both find no service and both start one. That is deliberately not coordinated: one wins the single-instance lock, the loser exits quietly, and both clients' readiness loops then connect to the winner. There are no PID files to go stale and no startup handshake to get wrong.
Classes¶
ServiceStartError-- A service was started but never became reachable.ServiceUnavailable-- No service is running and starting one was not permitted.
Functions¶
neutral_directory-- Return where the service should be started from: the filesystem root.open_connection-- Connect to the service, starting one if necessary.spawn_service-- Start a service in the background and return immediately.
Attributes¶
READY_TIMEOUT-- How long to keep polling for a service we just started.