fix stupid
This commit is contained in:
parent
c814c6e7d6
commit
590f2ed67b
|
@ -13,7 +13,7 @@ export type State = typeof state
|
|||
|
||||
const executor = async () => {
|
||||
const curTime = Date.now()
|
||||
const promises = config.pollEndpoints.map(async endpoint => {
|
||||
config.pollEndpoints.map(async endpoint => {
|
||||
const endpointState = state.get(endpoint.name)
|
||||
if (endpointState === undefined) console.log(`Could not find endpoint for ${endpoint.name}`)
|
||||
else if (curTime - endpointState.lastExec > ((endpoint.interval ?? defaultInterval) * 1000)) {
|
||||
|
@ -32,7 +32,6 @@ const executor = async () => {
|
|||
}
|
||||
}
|
||||
})
|
||||
await Promise.all(promises)
|
||||
}
|
||||
|
||||
const main = async () => {
|
||||
|
|
Loading…
Reference in New Issue