Skip to content

Commit

Permalink
enable uptime
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-flip committed Dec 23, 2023
1 parent c7d14ab commit 54fb9b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
},
"heartbeat": {
"uptime": {
"interval": 50000,
"endpoint": "http://statuspage_app_sp_1:3001/api/push/"
"interval": 60,
"endpoint": "https://status.flipped.codes/api/push/"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion functions/HEARTBEAT/uptime.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const axios = require('axios');

const params = (pingRaw) => (
{
status: 'up',
msg: 'OK',
ping: Math.round(pingRaw),
}
Expand All @@ -15,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 = {
Expand Down
2 changes: 1 addition & 1 deletion functions/SETUP/heartbeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports.run = async () => {
// client.functions.get('HEARTBEAT_BOTLIST_discordbots').run();
// client.functions.get('HEARTBEAT_BOTLIST_motiondevelopment').run();
// uptime page
// client.functions.get('HEARTBEAT_uptime').run();
client.functions.get('HEARTBEAT_uptime').run();
};

module.exports.data = {
Expand Down

0 comments on commit 54fb9b0

Please sign in to comment.