def notify_state_changed(self, old_state, new_state):
     if self._debug_messenger is None:
         return
     message = ChangingStateBroadcast(self.node_id, old_state, new_state)
     logger.debug("Sending debug message: {}".format(message.__getstate__()))
     support.wrap_exc(asyncio.async(self._debug_messenger.send_message(
         serialize_message(message, task2.flow.messenger.ENCODING))), logger)
 def _serialize(self, message: Message):
     self._logger.debug('Serialized message: {}...'.format(message.__getstate__()))
     return serialize_message(message, ENCODING)
 def _serialize(self, message: Message):
     self._logger.debug('Serialized message: {}...'.format(
         message.__getstate__()))
     return serialize_message(message, ENCODING)