From 5f0d211a9bdfb33778876e085c7a079276da523e Mon Sep 17 00:00:00 2001 From: hogweed1 Date: Mon, 12 May 2025 21:30:41 +1000 Subject: [PATCH] be be be --- handlers/metrics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/handlers/metrics.py b/handlers/metrics.py index 9bbc170..b5beb89 100644 --- a/handlers/metrics.py +++ b/handlers/metrics.py @@ -16,6 +16,7 @@ class user_info_struct: def metric_wrap(chatID:int, userName: str, length: int, attemptsCount: int): """Pass here chat ID, username, pipisa length and attempts count to wrap them into metric.""" + global METRICS_INITIALIZED if not METRICS_INITIALIZED: pipisa_length_metric = Gauge('user_length_total', 'Pipisa length', labelnames=['ChatID', 'Username']) user_attempt_metric = Gauge('user_attempts_total', 'Attempts count', labelnames=['ChatID', 'Username'])