Revert "Fix auto resolve markets query"
This reverts commit b405bd453a
.
This commit is contained in:
parent
b405bd453a
commit
26921451a8
|
@ -60,14 +60,12 @@ export const autoResolveMarkets = functions.pubsub
|
|||
firestore
|
||||
.collection('contracts')
|
||||
.where('isResolved', '==', false)
|
||||
.where('closeTime', '>', Date.now())
|
||||
.where('autoResolutionTime', '<', Date.now())
|
||||
)
|
||||
const closedContracts = contracts.filter(
|
||||
(c) => c.closeTime && c.closeTime < Date.now()
|
||||
)
|
||||
|
||||
await batchedWaitAll(
|
||||
closedContracts.map((contract) => async () => {
|
||||
contracts.map((contract) => async () => {
|
||||
const result = await autoResolve(contract)
|
||||
|
||||
console.log('resolved', contract.slug, 'result:', result)
|
||||
|
|
Loading…
Reference in New Issue
Block a user