fix
All checks were successful
Deploy Dev / Deploy dev (pull_request) Successful in 10s
Deploy Dev / Build (pull_request) Successful in 4s
Deploy Dev / Push (pull_request) Successful in 9s

This commit is contained in:
Egor Matveev 2025-06-12 02:39:08 +03:00
parent eed31426b2
commit c25796c5e0

View File

@ -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(