add loader and versioning

This commit is contained in:
Alex Bezdieniezhnykh
2025-06-10 08:53:57 +03:00
parent 7750025631
commit dcd0fabc1f
31 changed files with 284 additions and 123 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ import yaml
cdef class RemoteCommandHandler:
def __init__(self, int zmq_port, object on_command):
self._on_command = on_command
self._context = zmq.Context.instance()
self._context = zmq.Context()
self._router = self._context.socket(zmq.ROUTER)
self._router.setsockopt(zmq.LINGER, 0)
@@ -83,6 +83,7 @@ cdef class RemoteCommandHandler:
self._control.send(b"TERMINATE", flags=zmq.DONTWAIT)
except zmq.error.ZMQError:
pass
self._router.close(linger=0)
self._dealer.close(linger=0)
self._control.close(linger=0)
@@ -90,5 +91,4 @@ cdef class RemoteCommandHandler:
self._proxy_thread.join(timeout=2)
while any(w.is_alive() for w in self._workers):
time.sleep(0.1)
self._context.term()