groceries: stats page with nightly snapshot (battles, basket, promos, CPI, range)
All checks were successful
Deploy production / deploy (push) Successful in 1m19s

This commit is contained in:
2026-10-25 20:38:55 +00:00
parent c4397e9d59
commit a6ef263c7e
11 changed files with 35731 additions and 2 deletions

View File

@@ -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();
}