Removing _ from private variable.
@@ -25,7 +25,7 @@ from st2common.util.date import get_datetime_utc_now
PLUGIN_NAMESPACE = 'st2common.metrics.driver'
-_METRICS = None
+METRICS = None
class BaseMetricsDriver(object):
@@ -160,19 +160,19 @@ class CounterWithTimer(object):
def metrics_initialize():
"""Initialize metrics constant
"""
- global _METRICS
+ global METRICS
try:
- _METRICS = get_plugin_instance(PLUGIN_NAMESPACE, cfg.CONF.metrics.driver)
+ METRICS = get_plugin_instance(PLUGIN_NAMESPACE, cfg.CONF.metrics.driver)
except (NoMatches, MultipleMatches, NoSuchOptError):
- _METRICS = BaseMetricsDriver()
+ METRICS = BaseMetricsDriver()
- return _METRICS
+ return METRICS
def get_driver():
"""Return metrics driver instance
"""
- if not _METRICS:
+ if not METRICS:
return metrics_initialize()
- return _METRICS
+ return METRICS
