groceries: stats page with nightly snapshot (battles, basket, promos, CPI, range)
All checks were successful
Deploy production / deploy (push) Successful in 1m19s
All checks were successful
Deploy production / deploy (push) Successful in 1m19s
This commit is contained in:
@@ -24,6 +24,7 @@ import {
|
||||
regroup
|
||||
} from '../src/lib/server/groceries/import';
|
||||
import { applyTaxonomy } from '../src/lib/server/groceries/taxonomy';
|
||||
import { computeStats } from '../src/lib/server/groceries/stats';
|
||||
import { SOURCES } from '../src/lib/server/groceries/sources';
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
@@ -88,6 +89,12 @@ try {
|
||||
}
|
||||
await regroup(sql, log);
|
||||
await applyTaxonomy(sql, log);
|
||||
try {
|
||||
await computeStats(sql, log);
|
||||
} catch (e) {
|
||||
failed = true;
|
||||
log(`stats: FAILED ${e instanceof Error ? e.message : e}`);
|
||||
}
|
||||
} finally {
|
||||
await sql.end();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user