mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-23 00:01:31 +00:00
Refactor proxying to use new deserialization
This commit is contained in:
parent
cd36b6c22c
commit
aabaadc4c4
@ -6,7 +6,7 @@ from abc import ABC, abstractmethod
|
|||||||
|
|
||||||
from tornado.websocket import WebSocketHandler
|
from tornado.websocket import WebSocketHandler
|
||||||
|
|
||||||
from tfw.networking import deserialize_all
|
from tfw.networking import deserialize_tfw_msg
|
||||||
from tfw.config.logs import logging
|
from tfw.config.logs import logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
@ -31,7 +31,8 @@ class ZMQWebSocketHandler(WebSocketHandler, ABC):
|
|||||||
def zmq_callback(self, msg_parts):
|
def zmq_callback(self, msg_parts):
|
||||||
keyhandlers = {'mirror': self.mirror}
|
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)
|
LOG.debug('Received on pull socket: %s', message)
|
||||||
self.handle_trigger(message)
|
self.handle_trigger(message)
|
||||||
if key not in keyhandlers:
|
if key not in keyhandlers:
|
||||||
|
Loading…
Reference in New Issue
Block a user