Bump metrics updater functions to 1GB memory

This commit is contained in:
Marshall Polaris 2022-06-10 22:21:43 -07:00
parent 789c9aa32a
commit 1ab17bbbf0
2 changed files with 6 additions and 4 deletions

View File

@ -10,8 +10,9 @@ const firestore = admin.firestore()
const oneDay = 1000 * 60 * 60 * 24
export const updateContractMetrics = functions.pubsub
.schedule('every 15 minutes')
export const updateContractMetrics = functions
.runWith({ memory: '1GB' })
.pubsub.schedule('every 15 minutes')
.onRun(async () => {
const contractDocs = await firestore.collection('contracts').listDocuments()
await batchedWaitAll(

View File

@ -11,8 +11,9 @@ import { calculatePayout } from '../../common/calculate'
const firestore = admin.firestore()
export const updateUserMetrics = functions.pubsub
.schedule('every 15 minutes')
export const updateUserMetrics = functions
.runWith({ memory: '1GB' })
.pubsub.schedule('every 15 minutes')
.onRun(async () => {
const [users, contracts, bets] = await Promise.all([
getValues<User>(firestore.collection('users')),