From a5554663b46041f508a5f0c69b49af4305910c76 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 11 Dec 2019 15:50:15 +0000 Subject: [PATCH] add healthcheck.py to routinely call a URL for uptime pinging --- modules/healthcheck.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 modules/healthcheck.py diff --git a/modules/healthcheck.py b/modules/healthcheck.py new file mode 100644 index 00000000..0b13af0d --- /dev/null +++ b/modules/healthcheck.py @@ -0,0 +1,9 @@ +#--require-config healthcheck-url + +from src import ModuleManager, utils + +class Module(ModuleManager.BaseModule): + @utils.hook("cron") + @utils.kwarg("schedule", "*/10") + def ten_minutes(self, event): + utils.http.request(self.bot.config["healthcheck-url"])