Get the next command from the queue (FIFO).
(self)
| 140 | return True |
| 141 | |
| 142 | def dequeue_command(self) -> QueuedCommand | None: |
| 143 | """Get the next command from the queue (FIFO).""" |
| 144 | if self.command_queue: |
| 145 | cmd = self.command_queue.popleft() |
| 146 | logger.debug(f"Dequeued command {cmd.request_id} for {self.instance_id} (queue size: {self.queue_size})") |
| 147 | return cmd |
| 148 | return None |
| 149 | |
| 150 | def flush_queue(self, error_code: str, error_message: str) -> None: |
| 151 | """ |