fix stupid

This commit is contained in:
Lumeille 2024-03-09 22:29:00 +11:00
parent c814c6e7d6
commit 590f2ed67b
1 changed files with 1 additions and 2 deletions

View File

@ -13,7 +13,7 @@ export type State = typeof state
const executor = async () => { const executor = async () => {
const curTime = Date.now() const curTime = Date.now()
const promises = config.pollEndpoints.map(async endpoint => { config.pollEndpoints.map(async endpoint => {
const endpointState = state.get(endpoint.name) const endpointState = state.get(endpoint.name)
if (endpointState === undefined) console.log(`Could not find endpoint for ${endpoint.name}`) if (endpointState === undefined) console.log(`Could not find endpoint for ${endpoint.name}`)
else if (curTime - endpointState.lastExec > ((endpoint.interval ?? defaultInterval) * 1000)) { else if (curTime - endpointState.lastExec > ((endpoint.interval ?? defaultInterval) * 1000)) {
@ -32,7 +32,6 @@ const executor = async () => {
} }
} }
}) })
await Promise.all(promises)
} }
const main = async () => { const main = async () => {