fix queue update

This commit is contained in:
Alex Bezdieniezhnykh
2025-05-02 17:45:30 +03:00
parent 472ed6533e
commit 24442869c0
11 changed files with 24 additions and 22 deletions
+1 -7
View File
@@ -13,7 +13,6 @@ from remote_command cimport RemoteCommand, CommandType
from remote_command_handler cimport RemoteCommandHandler
from credentials cimport Credentials
from file_data cimport FileData
from user cimport User
cdef class CommandProcessor:
cdef ApiClient api_client
@@ -22,12 +21,7 @@ cdef class CommandProcessor:
cdef bint running
cdef Inference inference
def __init__(self):
with open(<str>constants.CONFIG_FILE, "r") as f:
config = yaml.safe_load(f)
zmq_port = config["zmq_port"]
api_url = config["api_url"]
def __init__(self, int zmq_port, str 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)