mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-24 12:15:27 -07:00
16 lines
435 B
TypeScript
16 lines
435 B
TypeScript
import { areLexicalDailyRollupsReady, rebuildLexicalDailyRollups } from './lexical-rollups';
|
|
import { Database } from './sqlite';
|
|
import { applyPragmas } from './storage';
|
|
|
|
export function executeLexicalRollupBackfillTask(dbPath: string): void {
|
|
const db = new Database(dbPath);
|
|
try {
|
|
applyPragmas(db);
|
|
if (!areLexicalDailyRollupsReady(db)) {
|
|
rebuildLexicalDailyRollups(db);
|
|
}
|
|
} finally {
|
|
db.close();
|
|
}
|
|
}
|