X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2Fprometheus.py;h=5afa4963c1f3e34e13da9bd6a2161d8ff186931b;hb=922c41753ffbb4b526f2135a23c39f480c58e2cb;hp=2be94afc99d8ea2a37ba1bd2d46879948ff4790d;hpb=43d82191273d8771c0da264065f8cfc0426b093d;p=osm%2FLCM.git diff --git a/osm_lcm/prometheus.py b/osm_lcm/prometheus.py index 2be94af..5afa496 100644 --- a/osm_lcm/prometheus.py +++ b/osm_lcm/prometheus.py @@ -24,6 +24,7 @@ import yaml import os from osm_lcm.lcm_utils import LcmException from osm_common.dbbase import DbException +from osm_lcm.data_utils.database.database import Database from jinja2 import Template, TemplateError, TemplateNotFound, TemplateSyntaxError __author__ = "Alfonso Tierno " @@ -53,9 +54,9 @@ class Prometheus: PROMETHEUS_LOCKED_TIME = 120 - def __init__(self, config, worker_id, db, loop, logger=None): + def __init__(self, config, worker_id, loop, logger=None): self.worker_id = worker_id - self.db = db + self.db = Database().instance.db self.loop = loop self.logger = logger or logging.getLogger("lcm.prometheus") self.server = config["uri"]