Skip to content

Commit

Permalink
changed ES_URL to class level
Browse files Browse the repository at this point in the history
  • Loading branch information
shashank-boyapally committed Jan 24, 2024
1 parent 00f64f3 commit 9c5ce70
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fmatch/matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import pandas as pd


ES_URL = os.getenv("ES_SERVER")



class Matcher:
Expand All @@ -20,6 +20,7 @@ class Matcher:


def __init__(self, index="perf_scale_ci", level=logging.INFO):
ES_URL = os.getenv("ES_SERVER") #pylint: disable = invalid-name
self.index = index
self.es_url = ES_URL
self.search_size = 10000
Expand Down Expand Up @@ -197,7 +198,7 @@ def burner_results(self, uuid, uuids, index):
runs = [item['_source'] for item in result["hits"]["hits"]]
return runs

def burner_metric_query(self, uuids, namespace, index, metricName):
def burner_metric_query(self, uuids, namespace, index, metric_name):
""" burner_metric_query will query for specific metricName data.
Args:
Expand Down Expand Up @@ -241,7 +242,7 @@ def burner_metric_query(self, uuids, namespace, index, metricName):
"query_string": {
"query": (
f'( uuid: \"{ids}\" )'
f' AND metricName: {metricName}'
f' AND metricName: {metric_name}'
f' AND labels.namespace.keyword: {namespace}'
)
}
Expand Down

0 comments on commit 9c5ce70

Please sign in to comment.