maple.utils.lock.is_daemon_running

maple.utils.lock.is_daemon_running(socket_path: Path = None) bool

Check if the MAPLE daemon is currently running.

Tests for daemon presence by checking socket file existence and attempting to connect. Returns False if socket doesn’t exist or if connection fails (stale socket).

This is a non-invasive check that doesn’t interfere with the running daemon.

Parameters:

socket_path – Optional custom socket path to check. Defaults to the standard daemon socket path.

Returns:

True if daemon is running and responsive, False otherwise.