1
0
mirror of https://github.com/tormachris/cf-workers-status-page.git synced 2025-07-17 04:15:15 +02:00

fix(gc): wait for gc to complete before exiting cron trigger

This commit is contained in:
Adam Janis
2020-11-14 02:37:42 +01:00
parent 7138e1473b
commit e305cede8f
3 changed files with 3 additions and 6 deletions

View File

@ -69,10 +69,10 @@ export async function gcMonitors(config) {
const keysForRemoval = kvState.filter(x => !monitors.includes(x))
keysForRemoval.forEach(key => {
for (const key of keysForRemoval) {
console.log('gc: deleting ' + checkKvPrefix + key)
deleteKV(checkKvPrefix + key)
})
await deleteKV(checkKvPrefix + key)
}
}
export async function notifySlack(monitor, newMetadata) {