diff --git a/fmatch/matcher.py b/fmatch/matcher.py index 156804f..aec9b76 100644 --- a/fmatch/matcher.py +++ b/fmatch/matcher.py @@ -1,5 +1,6 @@ """ metadata matcher """ +#pylint: disable = invalid-name import os import sys import logging @@ -19,8 +20,7 @@ class Matcher: """ - def __init__(self, index="perf_scale_ci", level=logging.INFO): - ES_URL = os.getenv("ES_SERVER") #pylint: disable = invalid-name + def __init__(self, index="perf_scale_ci", level=logging.INFO, ES_URL=os.getenv("ES_SERVER")): self.index = index self.es_url = ES_URL self.search_size = 10000 @@ -198,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, metric_name): + def burner_metric_query(self, uuids, namespace, index, metricName): """ burner_metric_query will query for specific metricName data. Args: @@ -242,7 +242,7 @@ def burner_metric_query(self, uuids, namespace, index, metric_name): "query_string": { "query": ( f'( uuid: \"{ids}\" )' - f' AND metricName: {metric_name}' + f' AND metricName: {metricName}' f' AND labels.namespace.keyword: {namespace}' ) }