def _fetch_messages(self):
"""
Get an input message from the socket
"""
try:
[_, msg] = self.socket.recv_multipart(flags=zmq.NOBLOCK)
if Global.CONFIG_MANAGER.tracing_mode:
Global.LOGGER.debug("fetched a new message")
self.fetched = self.fetched + 1
obj = pickle.loads(msg)
self._deliver_message(obj)
return obj
except zmq.error.Again:
return None
except Exception as new_exception:
Global.LOGGER.error(new_exception)
raise new_exception
评论列表
文章目录