From fa7ed410632566ecacf99e9e6dc612c5c335acb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20=C3=96ZDEM=C4=B0R?= Date: Fri, 26 Jun 2026 21:35:44 +0300 Subject: [PATCH] fix(health-agent): reload uk_tokens.yml on every push call instead of caching at startup --- health-agent/src/health_agent/uptime_kuma.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/health-agent/src/health_agent/uptime_kuma.py b/health-agent/src/health_agent/uptime_kuma.py index b0fcf53..4a1fe5a 100644 --- a/health-agent/src/health_agent/uptime_kuma.py +++ b/health-agent/src/health_agent/uptime_kuma.py @@ -1,7 +1,7 @@ import os import requests import logging -from health_agent.config import UK_TOKENS +from health_agent.config import load_uk_tokens logger = logging.getLogger(__name__) UK_PUSH_URL_BASE = os.getenv("UK_PUSH_URL_BASE", "https://uptime.tarla.io/api/push") @@ -9,7 +9,7 @@ UK_PUSH_URL_BASE = os.getenv("UK_PUSH_URL_BASE", "https://uptime.tarla.io/api/pu DRY_RUN = False def push(monitor_name: str, status: str, msg: str, ping_ms: int): - token = UK_TOKENS.get(monitor_name) + token = load_uk_tokens().get(monitor_name) if not token: logger.warning(f"No token found for monitor {monitor_name}") return