fix: serialize autonomy job leases

This commit is contained in:
ImBenji
2026-08-04 21:07:42 +01:00
parent 5037e1e192
commit b9ee10a83a
6 changed files with 14 additions and 1 deletions
+1
View File
@@ -10,6 +10,7 @@ async function runExecutionWorker({ intelligencePath, pollMs = 10000, mode = 'sh
if (!['shadow', 'paper'].includes(mode)) throw new Error(`unsupported execution mode: ${mode}`);
const db = new Database(intelligencePath);
db.pragma('journal_mode = WAL');
db.pragma('busy_timeout = 5000');
initAutonomySchema(db);
const paperClient = mode === 'paper'
? createAlpacaPaperClient({ keyId: process.env.ALPACA_PAPER_KEY_ID, secretKey: process.env.ALPACA_PAPER_SECRET_KEY })