From c25796c5e08419b29a825d22a5c432b27423daa1 Mon Sep 17 00:00:00 2001 From: Egor Matveev Date: Thu, 12 Jun 2025 02:39:08 +0300 Subject: [PATCH] fix --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 7ef9f17..ba2ba84 100644 --- a/main.py +++ b/main.py @@ -52,7 +52,6 @@ def get_hosts() -> list[str]: f"http://configurator/api/v1/fetch?project=certupdater&stage={os.getenv("STAGE")}" ).json() hosts = response["configs"]["hosts"] - print(f"got hosts {hosts}") return list(hosts) @@ -108,8 +107,10 @@ def update_host(host: str) -> str | None: while True: now = datetime.datetime.now() mongo_hosts = mongo.hosts + hosts = get_hosts() + print(f"got hosts {hosts}") updated = False - for host in get_hosts(): + for host in hosts: if ( now + datetime.timedelta(days=14) > mongo_hosts.get(