Skip to content

Commit 9936b18

Browse files
committed
fix(hook): align busy_timeout to 5000ms and guard friction digest by category
- Change busy_timeout from 1000ms to 5000ms to match the rest of the file - Guard the friction digest DB query with cats.includes("friction") so the block is skipped when friction is not a configured category
1 parent aaa4410 commit 9936b18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ if (command === "hook") {
7272
// Gracefully skip if the DB doesn't exist or is locked by the MCP server.
7373
let frictionDigest = "";
7474
const dbPath = getDbPath();
75-
if (existsSync(dbPath)) {
75+
if (cats.includes("friction") && existsSync(dbPath)) {
7676
try {
7777
const { connect } = await import("@tursodatabase/database");
7878
const db = await connect(dbPath);
7979
try {
8080
await db.exec("PRAGMA journal_mode=WAL");
81-
await db.exec("PRAGMA busy_timeout = 1000");
81+
await db.exec("PRAGMA busy_timeout = 5000");
8282
const rows = await db.prepare(
8383
"SELECT title, content, votes, target_type, target_name FROM feedback WHERE status = 'open' AND category = 'friction' ORDER BY votes DESC LIMIT 5"
8484
).all() as any[];

0 commit comments

Comments
 (0)