bot: Add more logging
All checks were successful
Build Docker / Build Docker (push) Successful in 18s

This commit is contained in:
Nathan Woodburn 2023-10-01 23:03:01 +11:00
parent d54da80ab6
commit 1e643f929d
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

3
bot.py
View File

@ -359,13 +359,16 @@ async def checkForSSLExpiry():
user = client.get_user(int(userid)) user = client.get_user(int(userid))
if user: if user:
await user.send(f"SSL certificate for {domain} expires soon") await user.send(f"SSL certificate for {domain} expires soon")
print(f"SSL certificate for {domain} expires soon", flush=True)
else: else:
# Test by sending a message # Test by sending a message
user = client.get_user(int(userid)) user = client.get_user(int(userid))
if user: if user:
await user.send(f"SSL certificate for {domain} is valid") await user.send(f"SSL certificate for {domain} is valid")
print(f"SSL certificate for {domain} is valid", flush=True)
except Exception as e: except Exception as e:
print(e, flush=True) print(e, flush=True)
log(e)
continue continue
print("SSL check complete", flush=True) print("SSL check complete", flush=True)