Increase memory and duration of scoreContracts
This commit is contained in:
parent
ffba70d556
commit
799eabbee4
|
@ -6,8 +6,9 @@ import { Contract } from '../../common/contract'
|
||||||
import { log } from './utils'
|
import { log } from './utils'
|
||||||
import { removeUndefinedProps } from '../../common/util/object'
|
import { removeUndefinedProps } from '../../common/util/object'
|
||||||
|
|
||||||
export const scoreContracts = functions.pubsub
|
export const scoreContracts = functions
|
||||||
.schedule('every 1 hours')
|
.runWith({ memory: '4GB', timeoutSeconds: 540 })
|
||||||
|
.pubsub.schedule('every 1 hours')
|
||||||
.onRun(async () => {
|
.onRun(async () => {
|
||||||
await scoreContractsInternal()
|
await scoreContractsInternal()
|
||||||
})
|
})
|
||||||
|
@ -49,7 +50,8 @@ async function scoreContractsInternal() {
|
||||||
|
|
||||||
let dailyScore: number | undefined
|
let dailyScore: number | undefined
|
||||||
if (contract.outcomeType === 'BINARY' && contract.mechanism === 'cpmm-1') {
|
if (contract.outcomeType === 'BINARY' && contract.mechanism === 'cpmm-1') {
|
||||||
dailyScore = popularityScore * Math.abs(contract.probChanges.day)
|
const percentChange = Math.abs(contract.probChanges.day)
|
||||||
|
dailyScore = popularityScore * percentChange
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user