feat: support postgres autonomy runtime
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const os = require('os');
|
||||
const Database = require('better-sqlite3');
|
||||
const { openRuntimeDb } = require('../src/db/runtime');
|
||||
const { initAutonomySchema } = require('../src/autonomy/schema');
|
||||
const { calibrateOutcomes, cohortKey } = require('../src/autonomy/calibration');
|
||||
const { decide } = require('../src/autonomy/policy');
|
||||
@@ -144,7 +144,7 @@ function refreshReplayEvaluations(db) {
|
||||
}
|
||||
|
||||
async function runCalibrationWorker({ intelligencePath, pollMs = 60000, workerId = `calibration-${os.hostname()}-${process.pid}` } = {}) {
|
||||
const db = new Database(intelligencePath);
|
||||
const db = openRuntimeDb(intelligencePath, { schema: 'intelligence' });
|
||||
db.pragma('journal_mode = WAL');
|
||||
db.pragma('busy_timeout = 5000');
|
||||
initAutonomySchema(db);
|
||||
|
||||
Reference in New Issue
Block a user