kaskada.api.local_session.local_session_keep_alive

Module Contents

Classes

LocalSessionKeepAlive

An implementation of a thread to poll the Local Session for the overall status and recover from failure by restarting the services.

Attributes

logger

logger[source]
class LocalSessionKeepAlive(manager_service, engine_service, client, interval_seconds=1, maximum_unready_polls=3, should_check=True)[source]

Bases: threading.Thread

An implementation of a thread to poll the Local Session for the overall status and recover from failure by restarting the services. This implementation is thread-safe.

Parameters:
run()[source]

Runs indefinitely and monitors the status of the manager service, the engine service, and the connected client. If any of them report unready, then all of the services are restarted and the client reconnects.

To stop the keep alive, use the stop() method to trigger the thread to conclude.

stop()[source]

Triggers the keep alive to stop checking and conclude.