manifold/functions/src/scripts/update-metrics.ts
Marshall Polaris 4f96b9ef63
Finish optimizing updateFooMetrics functions (#489)
* Consolidate metrics updates into one batch job

* Try batching updates of metrics

* Don't look up all bets again for all contracts

* Tidying up

* Make computeTotalPool less needlessly inefficient looking
2022-06-14 17:38:38 -07:00

16 lines
337 B
TypeScript

import { initAdmin } from './script-init'
initAdmin()
import { log, logMemory } from '../utils'
import { updateMetricsCore } from '../update-metrics'
async function updateMetrics() {
logMemory()
log('Updating metrics...')
await updateMetricsCore()
}
if (require.main === module) {
updateMetrics().then(() => process.exit())
}