def response_handler(self, msg):
ident, resp_bytes = msg
resp = json_decode(to_unicode(resp_bytes))
app_log.debug('resp: %s', resp)
subid = self.subscriptions.get('commandExecute')
if subid is not None:
self.write_message(json_encode({
'type': 'subscription_data',
'id': subid,
'payload': {
'data': resp
}
}))
评论列表
文章目录