fix hardware service

This commit is contained in:
Alex Bezdieniezhnykh
2025-05-02 13:25:33 +03:00
parent 7842fe1067
commit 472ed6533e
15 changed files with 118 additions and 142 deletions
+7 -2
View File
@@ -23,8 +23,13 @@ cdef class CommandProcessor:
cdef Inference inference
def __init__(self):
self.api_client = ApiClient()
self.remote_handler = RemoteCommandHandler(self.on_command)
with open(<str>constants.CONFIG_FILE, "r") as f:
config = yaml.safe_load(f)
zmq_port = config["zmq_port"]
api_url = config["api_url"]
self.api_client = ApiClient(api_url)
self.remote_handler = RemoteCommandHandler(zmq_port, self.on_command)
self.inference_queue = Queue(maxsize=constants.QUEUE_MAXSIZE)
self.remote_handler.start()
self.running = True