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:
2 files changed
+17
-1
No files matched your search
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user