mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? Sort sqlite connect attributes to ensure a deterministic string so the sqlite pool logic works correctly. ## Why? I noticed a lot of `database is locked (5) (SQLITE_BUSY)` errors when using a local dev server, and tracked it down to multiple services having separate connection to the db. The sqlite connection pool is supposed to prevent this, but it depends on the mapping from `ConnectAttributes` to a string being deterministic. The code that constructed the string was iterating over a `map[string]string` without sorting the keys making it nondeterministic. ## How did you test it? local testing, saw no more SQLITE_BUSY errors