From 2ede28e998f2f5c802f6e77ee7af922dec892206 Mon Sep 17 00:00:00 2001 From: Giambattista Bloisi Date: Sat, 27 Jul 2024 14:27:08 +0200 Subject: [PATCH] initial stage --- airflow/dags/init_opensearch_templates.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/airflow/dags/init_opensearch_templates.py b/airflow/dags/init_opensearch_templates.py index 31f559b..18f9916 100644 --- a/airflow/dags/init_opensearch_templates.py +++ b/airflow/dags/init_opensearch_templates.py @@ -1001,10 +1001,11 @@ def init_opensearch(os_client: OpenSearch): } }) - # try: - # os_client.indices.get_index_template("interoperability") - # except NotFoundError: - os_client.indices.delete_index_template(name="interoperability") + try: + os_client.indices.delete_index_template(name="interoperability") + except NotFoundError: + pass + os_client.indices.put_index_template( name="interoperability", body={