catch and log errors from healthcheck.py - otherwise it can CRITICAL

This commit is contained in:
jesopo 2019-12-18 21:11:14 +00:00
parent cfcccdd37b
commit 557c845769

View file

@ -9,4 +9,9 @@ class Module(ModuleManager.BaseModule):
@utils.hook("cron")
@utils.kwarg("schedule", "*/10")
def ten_minutes(self, event):
utils.http.request(self.bot.config["healthcheck-url"])
url = self.bot.config["healthcheck-url"]
try:
utils.http.request(url)
except Exception as e:
self.log.error("Failed to cal healthcheck-url (%s)", [url],
exc_info=True)