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