update AI initializing

rework AIAvailabilityStatus events to mediatr
This commit is contained in:
Oleksandr Bezdieniezhnykh
2025-09-01 20:12:13 +03:00
parent d1ce9d9365
commit 067f02cc63
23 changed files with 282 additions and 192 deletions
+2 -2
View File
@@ -44,8 +44,8 @@ cdef class CommandProcessor:
if command.command_type == CommandType.INFERENCE:
self.inference_queue.put(command)
elif command.command_type == CommandType.AI_AVAILABILITY_CHECK:
self.inference.build_tensor_engine(lambda status: self.remote_handler.send(command.client_id,
RemoteCommand(CommandType.AI_AVAILABILITY_RESULT, None, status).serialize()))
status = self.inference.ai_availability_status.serialize()
self.remote_handler.send(command.client_id, RemoteCommand(CommandType.AI_AVAILABILITY_RESULT, status).serialize())
elif command.command_type == CommandType.STOP_INFERENCE:
self.inference.stop()
elif command.command_type == CommandType.EXIT: