Bump metrics updater functions to 1GB memory
This commit is contained in:
parent
789c9aa32a
commit
1ab17bbbf0
|
@ -10,8 +10,9 @@ const firestore = admin.firestore()
|
||||||
|
|
||||||
const oneDay = 1000 * 60 * 60 * 24
|
const oneDay = 1000 * 60 * 60 * 24
|
||||||
|
|
||||||
export const updateContractMetrics = functions.pubsub
|
export const updateContractMetrics = functions
|
||||||
.schedule('every 15 minutes')
|
.runWith({ memory: '1GB' })
|
||||||
|
.pubsub.schedule('every 15 minutes')
|
||||||
.onRun(async () => {
|
.onRun(async () => {
|
||||||
const contractDocs = await firestore.collection('contracts').listDocuments()
|
const contractDocs = await firestore.collection('contracts').listDocuments()
|
||||||
await batchedWaitAll(
|
await batchedWaitAll(
|
||||||
|
|
|
@ -11,8 +11,9 @@ import { calculatePayout } from '../../common/calculate'
|
||||||
|
|
||||||
const firestore = admin.firestore()
|
const firestore = admin.firestore()
|
||||||
|
|
||||||
export const updateUserMetrics = functions.pubsub
|
export const updateUserMetrics = functions
|
||||||
.schedule('every 15 minutes')
|
.runWith({ memory: '1GB' })
|
||||||
|
.pubsub.schedule('every 15 minutes')
|
||||||
.onRun(async () => {
|
.onRun(async () => {
|
||||||
const [users, contracts, bets] = await Promise.all([
|
const [users, contracts, bets] = await Promise.all([
|
||||||
getValues<User>(firestore.collection('users')),
|
getValues<User>(firestore.collection('users')),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user