mirror of
https://github.com/tormachris/cf-workers-status-page.git
synced 2025-09-21 16:35:15 +02:00
@ -6,6 +6,7 @@ import {
|
||||
getCheckLocation,
|
||||
getKVMonitors,
|
||||
setKVMonitors,
|
||||
notifyDiscord,
|
||||
} from './helpers'
|
||||
|
||||
function getDate() {
|
||||
@ -88,6 +89,15 @@ export async function processCronTrigger(event) {
|
||||
event.waitUntil(notifyTelegram(monitor, monitorOperational))
|
||||
}
|
||||
|
||||
// Send Discord message on monitor change
|
||||
if (
|
||||
monitorStatusChanged &&
|
||||
typeof SECRET_DISCORD_WEBHOOK_URL !== 'undefined' &&
|
||||
SECRET_DISCORD_WEBHOOK_URL !== 'default-gh-action-secret'
|
||||
) {
|
||||
event.waitUntil(notifyDiscord(monitor, monitorOperational))
|
||||
}
|
||||
|
||||
// make sure checkDay exists in checks in cases when needed
|
||||
if (
|
||||
(config.settings.collectResponseTimes || !monitorOperational) &&
|
||||
|
Reference in New Issue
Block a user