Refactor proxying to use new deserialization

This commit is contained in:
Kristóf Tóth 2018-04-13 16:42:53 +02:00
parent cd36b6c22c
commit aabaadc4c4

View File

@ -6,7 +6,7 @@ from abc import ABC, abstractmethod
from tornado.websocket import WebSocketHandler
from tfw.networking import deserialize_all
from tfw.networking import deserialize_tfw_msg
from tfw.config.logs import logging
LOG = logging.getLogger(__name__)
@ -31,7 +31,8 @@ class ZMQWebSocketHandler(WebSocketHandler, ABC):
def zmq_callback(self, msg_parts):
keyhandlers = {'mirror': self.mirror}
key, message = deserialize_all(*msg_parts)
message = deserialize_tfw_msg(*msg_parts)
key = message['key']
LOG.debug('Received on pull socket: %s', message)
self.handle_trigger(message)
if key not in keyhandlers: