diff --git a/data/dailySnapshots/2026-03-21.json b/data/dailySnapshots/2026-03-21.json new file mode 100644 index 00000000..d2b96851 --- /dev/null +++ b/data/dailySnapshots/2026-03-21.json @@ -0,0 +1,7 @@ +{ + "date": "2026-03-21", + "indexScore": 50, + "delta": 0, + "topKeywords": [], + "emergingConcerns": [] +} \ No newline at end of file diff --git a/data/modelWeights.json b/data/modelWeights.json new file mode 100644 index 00000000..5cf6db09 --- /dev/null +++ b/data/modelWeights.json @@ -0,0 +1,24 @@ +{ + "categoryWeights": { + "Pothole": 5, + "Garbage": 3, + "Water Supply": 4, + "Streetlight": 2, + "Flooding": 8 + }, + "duplicateThreshold": 0.84, + "lastUpdated": "2026-03-21T19:01:11.261Z", + "history": [ + { + "date": "2026-03-21", + "categoryWeights": { + "Pothole": 5, + "Garbage": 3, + "Water Supply": 4, + "Streetlight": 2, + "Flooding": 8 + }, + "duplicateThreshold": 0.85 + } + ] +} \ No newline at end of file diff --git a/scheduler/dailyRefinementJob.ts b/scheduler/dailyRefinementJob.ts index 15f2a238..adf7065d 100644 --- a/scheduler/dailyRefinementJob.ts +++ b/scheduler/dailyRefinementJob.ts @@ -8,7 +8,7 @@ import { Issue } from "../services/types"; // Load environmental or fallback to test.db or production db const dbPath = - process.env.DB_PATH || path.join(__dirname, "../../backend/app.db"); + process.env.DB_PATH || path.join(__dirname, "../data/issues.db"); export class DailyRefinementJob { private db: sqlite3.Database; diff --git a/test_run.ts b/test_run.ts new file mode 100644 index 00000000..ccc96109 --- /dev/null +++ b/test_run.ts @@ -0,0 +1,6 @@ +import { DailyRefinementJob } from './scheduler/dailyRefinementJob'; +const job = new DailyRefinementJob(); +job.runRefinement().then(() => { + console.log("Done"); + process.exit(0); +});