Compare commits

..

No commits in common. "c0eefdf3f0cec33d6046c78fbac689c0187c739f" and "d4ef8b6b7c2e987dbf15d50672e5e25d00945cf5" have entirely different histories.

View File

@ -37,7 +37,7 @@ while True:
now = datetime.datetime.now() now = datetime.datetime.now()
mongo_hosts = mongo.hosts mongo_hosts = mongo.hosts
for host in get_hosts(): for host in get_hosts():
if now + datetime.timedelta(days=14) > mongo_hosts.get(host, {"expire_time": datetime.datetime.fromtimestamp(1)})["expire_time"]: if now + datetime.timedelta(days=14) > mongo_hosts[host]["expire_time"]:
update_host(host) update_host(host)
print(f"Host {host} updated") print(f"Host {host} updated")
minio.put_object("certupdater", "nginx.conf", ) minio.put_object("certupdater", "nginx.conf", )