aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2019-12-11 15:50:15 +0000
committerGravatar jesopo2019-12-11 15:50:15 +0000
commita5554663b46041f508a5f0c69b49af4305910c76 (patch)
treedb41df1febc918c0790b632079b2f818c61fcf4c
parentfirst draft on cron module (diff)
signature
add healthcheck.py to routinely call a URL for uptime pinging
-rw-r--r--modules/healthcheck.py9
1 files changed, 9 insertions, 0 deletions
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"])