diff options
| author | 2019-12-18 21:11:14 +0000 | |
|---|---|---|
| committer | 2019-12-18 21:11:14 +0000 | |
| commit | 557c8457694ae5f54ebb5a8421048d7b3f6f4216 (patch) | |
| tree | 315e61e88f267fdcae49c47919c730693c4935f9 | |
| parent | we no longer use DECODE_CONTENT_TYPES (diff) | |
| signature | ||
catch and log errors from healthcheck.py - otherwise it can CRITICAL
| -rw-r--r-- | modules/healthcheck.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/healthcheck.py b/modules/healthcheck.py index 0cf2c72b..3b5acfe2 100644 --- a/modules/healthcheck.py +++ b/modules/healthcheck.py @@ -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) |
