mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:46:30 +00:00
add loader and versioning
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user