From 13b2e452da920c99216a4b1bd7c1949abb69f865 Mon Sep 17 00:00:00 2001 From: Christian Mueller Date: Fri, 24 Apr 2026 12:26:19 +0200 Subject: [PATCH] fix: add 10s timeout to SQLite connections to prevent database locked errors Co-Authored-By: Claude Opus 4.6 (1M context) --- database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database.py b/database.py index d034d7a..c5652ff 100644 --- a/database.py +++ b/database.py @@ -5,7 +5,7 @@ DB_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "busylight.db def get_db(): - conn = sqlite3.connect(DB_PATH) + conn = sqlite3.connect(DB_PATH, timeout=10) conn.row_factory = sqlite3.Row conn.execute("PRAGMA journal_mode=WAL") conn.execute("PRAGMA foreign_keys=ON")