enabled uptime
Some checks are pending
Deploy / build (push) Waiting to run

This commit is contained in:
Phil 2023-12-23 15:22:41 +01:00
commit 4ba3a3712a
3 changed files with 6 additions and 5 deletions

View file

@ -19,8 +19,8 @@
"functions": {
"heartbeat": {
"uptime": {
"interval": 50000,
"endpoint": "http://statuspage_app_sp_1:3001/api/push/"
"interval": 60,
"endpoint": "https://status.flipped.codes/api/push/"
}
},
"messageGarbageCollection": {

View file

@ -1,7 +1,9 @@
// TODO: use vanilla implementation so not an entire package is needed
const axios = require('axios');
const params = (pingRaw) => (
{
status: 'up',
msg: 'OK',
ping: Math.round(pingRaw),
}
@ -14,7 +16,7 @@ function sendHeartbeat() {
module.exports.run = async () => {
setInterval(() => {
sendHeartbeat();
}, config.functions.heartbeat.uptime.interval);
}, config.functions.heartbeat.uptime.interval * 1000);
};
module.exports.data = {

View file

@ -16,8 +16,7 @@ module.exports.run = async () => {
// client.functions.get('HEARTBEAT_BOTLIST_discordbots').run();
// client.functions.get('HEARTBEAT_BOTLIST_motiondevelopment').run();
// uptime page
// TODO: curreclty not set up
// client.functions.get('HEARTBEAT_uptime').run();
client.functions.get('HEARTBEAT_uptime').run();
};
module.exports.data = {