fix(health-agent): reload uk_tokens.yml on every push call instead of caching at startup
This commit is contained in:
parent
0551b01c64
commit
fa7ed41063
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user