Add query to help avoid timeout
This commit is contained in:
parent
27b46f4306
commit
91e5abe76a
|
@ -15,7 +15,10 @@ export const resetBettingStreaksForUsers = functions.pubsub
|
|||
})
|
||||
|
||||
const resetBettingStreaksInternal = async () => {
|
||||
const usersSnap = await firestore.collection('users').get()
|
||||
const usersSnap = await firestore
|
||||
.collection('users')
|
||||
.where('currentBettingStreak', '>', 0)
|
||||
.get()
|
||||
|
||||
const users = usersSnap.docs.map((doc) => doc.data() as User)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user