def __init__(self, storage, config=None):
        """Constructor."""
        self.storage = storage
        self.config = {'es_index': [],
                       # 'query_size': 2000,
                       # 'query_scroll_size': '10m',
                       'overwrite_files': False,
                       'es_host': '127.0.0.1',
                       'es_port': '443'
                       }
        if config:
            self.config.update(config.get('elasticsearch'))
        self._esd = Elasticsearch(
            hosts=[
                {
                    'host': self.config['es_host'],
                    'port': self.config['es_port']
                },
                ],
            timeout=900
        )
        # Check connection to Elasticsearch.
        self._esd.ping()
        self._download_filter = []
def __init__ ( self , storage , config = None ) : self . storage = storage self . config = { 'es_index' : [ ] , 'overwrite_files' : False , 'es_host' : '127.0.0.1' , 'es_port' : '443' } if config : self . config . update ( config . get ( 'elasticsearch' ) ) self . _esd = Elasticsearch ( hosts = [ { 'host' : self . config [ 'es_host' ] , 'port' : self . config [ 'es_port' ] } , ] , timeout = 900 ) self . _esd . ping ( ) self . _download_filter = [ ]
Constructor.