def _on_push_data(self, submission): """Parse ClientStateUpdate and call the appropriate events.""" for state_update in parsers.parse_submission(submission): self._active_client_state = ( state_update.state_update_header.active_client_state ) yield from self.on_state_update.fire(state_update)
def _on_push_data(self, submission): """Parse ClientStateUpdate and call the appropriate events.""" for state_update in parsers.parse_submission(submission): if isinstance(state_update, dict) and 'client_id' in state_update: # Hack to receive client ID: self._client_id = state_update['client_id'] logger.info('Received new client_id: {}'.format( self._client_id)) else: self._active_client_state = ( state_update.state_update_header.active_client_state) yield from self.on_state_update.fire(state_update)
def _on_push_data(self, submission): """Parse ClientStateUpdate and call the appropriate events.""" for state_update in parsers.parse_submission(submission): if isinstance(state_update, dict) and 'client_id' in state_update: # Hack to receive client ID: self._client_id = state_update['client_id'] logger.info('Received new client_id: {}' .format(self._client_id)) else: self._active_client_state = ( state_update.state_update_header.active_client_state ) yield from self.on_state_update.fire(state_update)
def _on_push_data(self, submission): """Parse ClientStateUpdate and call the appropriate events.""" for state_update in parsers.parse_submission(submission): self.on_state_update.fire(state_update)
def _on_push_data(self, submission): """Parse ClientStateUpdate and call the appropriate events.""" for state_update in parsers.parse_submission(submission): self._active_client_state = ( state_update.state_update_header.active_client_state) yield from self.on_state_update.fire(state_update)