MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / to_dict

Method to_dict

relay/instance_registry.py:93–108  ·  view source on GitHub ↗

Convert to dictionary for API response

(self, is_default: bool = False)

Source from the content-addressed store, hash-verified

91 return len(self.command_queue) >= QUEUE_MAX_SIZE
92
93 def to_dict(self, is_default: bool = False) -> dict:
94 """Convert to dictionary for API response"""
95 d = {
96 "ref_id": self.ref_id,
97 "instance_id": self.instance_id,
98 "project_name": self.project_name,
99 "unity_version": self.unity_version,
100 "bridge_version": self.bridge_version,
101 "status": self.status.value,
102 "is_default": is_default,
103 "capabilities": self.capabilities,
104 "queue_size": self.queue_size,
105 }
106 if self.status_detail is not None:
107 d["status_detail"] = self.status_detail
108 return d
109
110 def update_heartbeat(self) -> None:
111 """Update last heartbeat timestamp"""

Callers 6

test_to_dictMethod · 0.95
flush_queueMethod · 0.45
list_allMethod · 0.45

Calls

no outgoing calls