Browse Source

@staticmethod to ServerMessage.fromJSON

pull/1/head
Coin de Gamma 6 years ago
parent
commit
a3f4aeff35
  1. 3
      analytics/analytics/services/server_service.py

3
analytics/analytics/services/server_service.py

@ -27,6 +27,7 @@ class ServerMessage:
result['requestId'] = self.request_id
return result
@staticmethod
def fromJSON(json: dict):
method = json['method']
payload = None
@ -86,7 +87,7 @@ class ServerService:
if message.request_id is not None:
self.responses[message_object['requestId']] = message.payload
return
logger.debug(message.toJSON())
asyncio.ensure_future(self.on_message_handler(message))
except Exception as e:

Loading…
Cancel
Save