add container to testdata.py
This commit is contained in:
parent
f6455638d7
commit
f2c29b237b
1 changed files with 3 additions and 7 deletions
|
@ -12,8 +12,6 @@ class ItemCountCollector(object):
|
||||||
def collect(self):
|
def collect(self):
|
||||||
counter = CounterMetricFamily("item_count", "Current number of items", labels=['event', 'returned_state'])
|
counter = CounterMetricFamily("item_count", "Current number of items", labels=['event', 'returned_state'])
|
||||||
|
|
||||||
yield counter
|
|
||||||
|
|
||||||
if not apps.models_ready or not apps.apps_ready:
|
if not apps.models_ready or not apps.apps_ready:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -53,8 +51,6 @@ class TicketCountCollector(object):
|
||||||
yield counter
|
yield counter
|
||||||
|
|
||||||
|
|
||||||
try:
|
|
||||||
REGISTRY.register(ItemCountCollector())
|
REGISTRY.register(ItemCountCollector())
|
||||||
REGISTRY.register(TicketCountCollector())
|
REGISTRY.register(TicketCountCollector())
|
||||||
except Exception as e:
|
|
||||||
print(e)
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue