add container to testdata.py
This commit is contained in:
parent
f6455638d7
commit
4338d6b03a
1 changed files with 5 additions and 5 deletions
|
@ -42,6 +42,8 @@ class TicketCountCollector(object):
|
||||||
def collect(self):
|
def collect(self):
|
||||||
counter = CounterMetricFamily("c3lf_ticket_count", "Current number of tickets", labels=['event', 'event_id'])
|
counter = CounterMetricFamily("c3lf_ticket_count", "Current number of tickets", labels=['event', 'event_id'])
|
||||||
|
|
||||||
|
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 +55,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