sqldb: wire up BusyTimeout config for SQLite store

The SqliteConfig.BusyTimeout field existed but was never used — the
busy_timeout pragma was hardcoded to 5000ms. Add a busyTimeoutMs()
helper that returns the configured value or falls back to the 5000ms
default, and use it when constructing the SQLite DSN.
This commit is contained in:
ziggie committed 2026-02-11 13:15:56 +01:00
1 parent 3807c6c563
commit 57fd965932
2 files changed
+17 -1

No files matched your search

+1 -1
View File
@@ -70,7 +70,7 @@ func NewSqliteStore(cfg *SqliteConfig, dbPath string) (*SqliteStore, error) {
},
{
name: "busy_timeout",
value: "5000",
value: fmt.Sprintf("%d", cfg.busyTimeoutMs()),
},
{
// With the WAL mode, this ensures that we also do an