diff --git a/index.js b/index.js index 97403bb..402dd9d 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ kuma.status(process.env.STATUSPAGE).then((status) => { for (let monitor of x.monitors) { totalCount++; // Increment total services count // Check if the service is online - if (monitor.heartbeats.slice().status) { + if (monitor.heartbeats.slice(-1)[0].status) { onlineCount++; // Increment online services count } else { offline.push(monitor.name) @@ -52,7 +52,8 @@ kuma.status(process.env.STATUSPAGE).then((status) => { } runCommand(process.env.TTS, statusString).then((output) => { - runCommand(`ffmpeg -y -i /tmp/kuma-status.wav -ar 8000 -ac 1 -c:a pcm_s16le /tmp/kuma-status-final.wav`) + console.log(output) + //runCommand(`ffmpeg -y -i /tmp/kuma-status.wav -ar 8000 -ac 1 -c:a pcm_s16le /tmp/kuma-status-final.wav`) }).catch(err => { console.log(err) })