From f92231d47bf32e1e2c7654408fade94476d86f62 Mon Sep 17 00:00:00 2001 From: khaledk2 Date: Fri, 27 Sep 2024 12:24:02 +0100 Subject: [PATCH] debig --- omero_search_engine/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/omero_search_engine/__init__.py b/omero_search_engine/__init__.py index b617199..f76679d 100644 --- a/omero_search_engine/__init__.py +++ b/omero_search_engine/__init__.py @@ -72,14 +72,19 @@ def create_app(config_name="development"): search_omero_app.app_context() search_omero_app.app_context().push() ELASTIC_PASSWORD = app_config.ELASTIC_PASSWORD + import ssl + context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) + context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 + es_connector = Elasticsearch( app_config.ELASTICSEARCH_URL.split(","), verify_certs=app_config.verify_certs, - timeout=130, - max_retries=20, + timeout=210, + max_retries=30, retry_on_timeout=True, connections_per_node=10, scheme="https", + ssl_context=context, http_auth=("elastic", ELASTIC_PASSWORD), )