MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / is_daemon_running

Function is_daemon_running

core/daemon.py:642–654  ·  view source on GitHub ↗

Check if daemon is running by testing socket.

()

Source from the content-addressed store, hash-verified

640# ==================== CLI Functions ====================
641
642def is_daemon_running() -> bool:
643 """Check if daemon is running by testing socket."""
644 if not SOCKET_FILE.exists():
645 return False
646
647 try:
648 sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
649 sock.settimeout(1.0)
650 sock.connect(str(SOCKET_FILE))
651 sock.close()
652 return True
653 except (socket.error, OSError):
654 return False
655
656
657def send_command(cmd: str, data: Dict = None, timeout: float = 60.0) -> Dict:

Callers

nothing calls this directly

Calls 2

existsMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected