run keep awake every 30 seconds

This commit is contained in:
mantikoros 2021-12-18 14:29:27 -06:00
parent 83a75def06
commit f93d10f850

View File

@ -9,4 +9,15 @@ export const keepAwake = functions.pubsub
callCloudFunction('placeBet'),
callCloudFunction('resolveMarket'),
])
await sleep(30)
await Promise.all([
callCloudFunction('placeBet'),
callCloudFunction('resolveMarket'),
])
})
const sleep = (seconds: number) => {
return new Promise((resolve) => setTimeout(resolve, seconds * 1000))
}