def handle_stream_event()

in src/influxDBTokenStreamHandler.py [0:0]


    def handle_stream_event(self, event: SubscriptionResponseMessage) -> None:
        """
        When we receive a message over IPC on the token request topic, publish the token on the response topic.

        Parameters
        ----------
            event(SubscriptionResponseMessage): The received IPC message

        Returns
        -------
            None
        """
        try:
            message = str(event.binary_message.message, "utf-8")
            if message == 'GetInfluxDBData':
                logging.info('Sending InfluxDB RW Token on the response topic')
                self.publish_response()
            else:
                logging.warning('Unknown request type received over pub/sub')
        except Exception:
            logging.error('Received an error', exc_info=True)