From f2c29b237b3dfd031d98d04cfbb72a19d67778e8 Mon Sep 17 00:00:00 2001 From: jedi Date: Fri, 27 Dec 2024 21:07:09 +0100 Subject: [PATCH] add container to testdata.py --- core/core/metrics.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/core/core/metrics.py b/core/core/metrics.py index 2b1f4a6..b46fb37 100644 --- a/core/core/metrics.py +++ b/core/core/metrics.py @@ -12,8 +12,6 @@ class ItemCountCollector(object): def collect(self): counter = CounterMetricFamily("item_count", "Current number of items", labels=['event', 'returned_state']) - yield counter - if not apps.models_ready or not apps.apps_ready: return @@ -53,8 +51,6 @@ class TicketCountCollector(object): yield counter -try: - REGISTRY.register(ItemCountCollector()) - REGISTRY.register(TicketCountCollector()) -except Exception as e: - print(e) + +REGISTRY.register(ItemCountCollector()) +REGISTRY.register(TicketCountCollector())