fix: speed up rollups
This commit is contained in:
parent
4bf8d1b20d
commit
89f0856a04
|
|
@ -105,7 +105,9 @@ export async function startRollupJob() {
|
|||
console.error("[rollup] force-run check failed:", e);
|
||||
}
|
||||
|
||||
// Periodic refreshes for the *current* bucket of each resolution.
|
||||
setInterval(() => { rollupCurrent("hourly").catch((e) => console.warn("[rollup] hourly failed:", e)); }, 5 * 60 * 1000);
|
||||
setInterval(() => { rollupCurrent("daily").catch((e) => console.warn("[rollup] daily failed:", e)); }, 30 * 60 * 1000);
|
||||
// Periodic refreshes for the *current* bucket of each resolution. Each query
|
||||
// is bounded by the current bucket only (date_trunc(...)) so it stays cheap
|
||||
// even at high cadence.
|
||||
setInterval(() => { rollupCurrent("hourly").catch((e) => console.warn("[rollup] hourly failed:", e)); }, 30 * 1000); // every 30s
|
||||
setInterval(() => { rollupCurrent("daily").catch((e) => console.warn("[rollup] daily failed:", e)); }, 5 * 60 * 1000); // every 5min
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue