Commit 1fd931d3 authored by mkollo's avatar mkollo
Browse files

Changed previous fix to avoid complications from cluster errors.

parent 4e9782a2
......@@ -684,11 +684,13 @@ class ES_Manager:
return response['count']
def single_index_count(index_name: str) -> int:
count = Search(using=Elasticsearch(es_url), index=index_name).count()
def single_index_count(index_name: str):
es = Elasticsearch(es_url)
status =, h="status").strip()
if status == "open":
count = Search(using=es, index=index_name).count()
return count
except elasticsearch.RequestError as e:
return None
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment