Skip to content

Commit

Permalink
brackets to be explizit
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Nov 13, 2023
1 parent 628b1ef commit f46ad8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/collective/elastic/ingest/ingest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def _es_pipeline_name(index_name):


def setup_ingest_pipelines(full_schema, index_name):
logger.debug("setup ingest piplines")
es = get_ingest_client()
pipeline_name = _es_pipeline_name(index_name)
pipelines = {
Expand All @@ -47,11 +48,12 @@ def setup_ingest_pipelines(full_schema, index_name):
if pipelines["processors"]:
logger.info(f"update ingest pipelines {pipeline_name}")
logger.debug(f"pipeline definitions:\n{pipelines}")
if not OPENSEARCH and ELASTICSEARCH_7 or OPENSEARCH and OPENSEARCH_2:
if (not OPENSEARCH and ELASTICSEARCH_7) or (OPENSEARCH and OPENSEARCH_2):
es.ingest.put_pipeline(pipeline_name, pipelines)
else:
es.ingest.put_pipeline(id=pipeline_name, processors=pipelines["processors"])
else:
logger.info(f"delete ingest pipelines {pipeline_name}")
es.ingest.delete_pipeline(pipeline_name)


Expand Down

0 comments on commit f46ad8f

Please sign in to comment.