code: def Close(self):
      
      super(TimesketchOutputModule, self).Close()
  
      with self._timesketch.app_context():
        search_index = timesketch_sketch.SearchIndex.query.filter_by(
            index_name=self._index_name).first()
        search_index.status.remove(search_index.status[0])
        timesketch_db_session.add(search_index)
        timesketch_db_session.commit()
docs: Closes the connection to TimeSketch Elasticsearch database.
  
      Sends the remaining events for indexing and removes the processing status on
      the Timesketch search index object.