def write_message(self, message): self.send(ddp.serialize(message)) ddp_session_id = None try: ddp_session_id = self.ddp_session.ddp_session_id except: pass
def write_message(self, message): IOLoop.instance().add_callback(self._send, ddp.serialize(message))