mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 18:41:32 +00:00
Move ioloop init to module level
This commit is contained in:
parent
7e4f8ae2f9
commit
6246baa675
@ -6,10 +6,11 @@ from zmq.eventloop.zmqstream import ZMQStream
|
|||||||
|
|
||||||
from config import PUBLISHER_PORT, RECEIVER_PORT
|
from config import PUBLISHER_PORT, RECEIVER_PORT
|
||||||
|
|
||||||
|
ioloop.install()
|
||||||
|
|
||||||
|
|
||||||
class Messaging:
|
class Messaging:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
ioloop.install()
|
|
||||||
self._zmq_context = zmq.Context.instance()
|
self._zmq_context = zmq.Context.instance()
|
||||||
self._zmq_sub_socket = self._zmq_context.socket(zmq.SUB)
|
self._zmq_sub_socket = self._zmq_context.socket(zmq.SUB)
|
||||||
self._zmq_sub_socket.connect('tcp://localhost:{}'.format(PUBLISHER_PORT))
|
self._zmq_sub_socket.connect('tcp://localhost:{}'.format(PUBLISHER_PORT))
|
||||||
|
Loading…
Reference in New Issue
Block a user