From d2dc7a1cbd9c48b1fc76083ec6b8edf875b0aeab Mon Sep 17 00:00:00 2001 From: Romain Gayon Date: Thu, 7 May 2020 16:44:07 +0200 Subject: [PATCH] add timeout --- dfdewey/datastore/elastic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dfdewey/datastore/elastic.py b/dfdewey/datastore/elastic.py index f4ef595..81dbc2f 100644 --- a/dfdewey/datastore/elastic.py +++ b/dfdewey/datastore/elastic.py @@ -38,7 +38,7 @@ class ElasticsearchDataStore(object): def __init__(self, host='127.0.0.1', port=9200): """Create an Elasticsearch client.""" super(ElasticsearchDataStore, self).__init__() - self.client = Elasticsearch([{'host': host, 'port': port}]) + self.client = Elasticsearch([{'host': host, 'port': port}], timeout=30) self.import_counter = collections.Counter() self.import_events = []