Compare commits

...

2 Commits

Author SHA1 Message Date
c0eefdf3f0 Merge pull request 'fix' (#10) from master into dev
Reviewed-on: #10
2025-06-01 14:01:58 +03:00
Egor Matveev
0f4e509639 fix
All checks were successful
Deploy Dev / Build (pull_request) Successful in 5s
Deploy Dev / Push (pull_request) Successful in 8s
Deploy Dev / Deploy dev (pull_request) Successful in 6s
2025-06-01 14:01:42 +03:00

View File

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