Fix ES issue with capital letters in index name

This commit is contained in:
allegroai 2022-05-18 10:18:23 +03:00
parent 174f84514a
commit 2570bd9e26
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ class QueueMetrics:
@staticmethod
def _queue_metrics_prefix_for_company(company_id: str) -> str:
"""Returns the es index prefix for the company"""
return f"queue_metrics_{company_id}_"
return f"queue_metrics_{company_id.lower()}_"
@staticmethod
def _get_es_index_suffix():

View File

@ -20,7 +20,7 @@ class WorkerStats:
@staticmethod
def worker_stats_prefix_for_company(company_id: str) -> str:
"""Returns the es index prefix for the company"""
return f"worker_stats_{company_id}_"
return f"worker_stats_{company_id.lower()}_"
def _search_company_stats(self, company_id: str, es_req: dict) -> dict:
return self.es.search(