#5: Sending status code in the website error notification

This commit is contained in:
Patrick Müller 2021-03-11 19:22:48 +01:00
parent a1aed9f721
commit 898a0ba42d

View File

@ -36,8 +36,8 @@ def runPings():
else:
resTuple = (website['website_id'], False, statusCode)
telegram.sendMessage(users[website['admin_id']]['telegram_id'], (
'Your website {} ({}) is not reachable at the moment. Maybe give it a check.'
).format(website['name'], website['url']))
'Your website {} ({}) is not reachable at the moment (Code {}). Maybe give it a check.'
).format(website['name'], website['url'], statusCode))
websitePingResults.append(resTuple)
cur = conn.cursor()