Updated Elasticsearch timeout
authorThierry Florac <tflorac@ulthar.net>
Fri, 13 Nov 2020 13:16:14 +0100
changeset 170 6ca1818afe51
parent 169 5cf3158b25cf
child 171 2c8a4c796d1e
Updated Elasticsearch timeout
src/pyams_content_es/zmi/db.py
--- a/src/pyams_content_es/zmi/db.py	Mon Jul 20 14:18:27 2020 +0200
+++ b/src/pyams_content_es/zmi/db.py	Fri Nov 13 13:16:14 2020 +0100
@@ -111,6 +111,7 @@
             init_progress_status(progress_id, request.principal.id, "Elasticsearch index check")
         results = {}
         search = Search(using=client.es, index=client.index) \
+            .params(request_timeout=30) \
             .query(Q('exists', **{'field': 'content_type'})) \
             .source(['internal_id', 'workflow.status'])
         count, first, page_size = -1, 0, 100