(self)
Close the streamer.
Close the streamer.
Close the streamer .
def close(self):
        """Close the streamer."""
        try:
            self._ready()
        except ValueError:
            return

        if self._data_lines:
            self.flush(end_stream=True)

        # Trigger auto analyzer pipeline to kick in.
        pipe_resource = '{0:s}/sketches/{1:d}/analyzer/'.format(
            self._sketch.api.api_root, self._sketch.id)
        data = {
            'index_name': self._index
        }
        _ = self._sketch.api.session.post(pipe_resource, json=data)
def close ( self ) : try : self . _ready ( ) except ValueError : return if self . _data_lines : self . flush ( end_stream = True ) # Trigger auto analyzer pipeline to kick in. pipe_resource = '{0:s}/sketches/{1:d}/analyzer/' . format ( self . _sketch . api . api_root , self . _sketch . id ) data = { 'index_name' : self . _index } _ = self . _sketch . api . session . post ( pipe_resource , json = data )