1
0
mirror of https://github.com/tormachris/cf-workers-status-page.git synced 2025-09-21 16:35:15 +02:00

feat: move gc monitors from cron schedule to deploy postCommands

This commit is contained in:
Adam Janis
2020-11-18 21:01:56 +01:00
parent 126a48b5cb
commit fe1b63424d
7 changed files with 105 additions and 35 deletions

View File

@ -3,7 +3,6 @@ import config from '../../config.yaml'
import {
setKV,
getKVWithMetadata,
gcMonitors,
getKV,
notifySlack,
} from './helpers'
@ -70,8 +69,5 @@ export async function processCronTrigger(event) {
const loc = res.headers.get('cf-ray').split('-')[1]
await setKV('lastUpdate', Date.now(), { loc })
// gc monitor statuses
event.waitUntil(gcMonitors(config))
return new Response('OK')
}