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

Method enqueue_command

relay/instance_registry.py:129–140  ·  view source on GitHub ↗

Add a command to the queue. Returns True if successful, False if queue is full or disabled.

(self, cmd: QueuedCommand)

Source from the content-addressed store, hash-verified

127 )
128
129 def enqueue_command(self, cmd: QueuedCommand) -> bool:
130 """
131 Add a command to the queue.
132 Returns True if successful, False if queue is full or disabled.
133 """
134 if not self.queue_enabled:
135 return False
136 if self.is_queue_full:
137 return False
138 self.command_queue.append(cmd)
139 logger.debug(f"Enqueued command {cmd.request_id} for {self.instance_id} (queue size: {self.queue_size})")
140 return True
141
142 def dequeue_command(self) -> QueuedCommand | None:
143 """Get the next command from the queue (FIFO)."""

Callers 1

_enqueue_commandMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected