1
Fork 0

configure SQLite to work in multi-connection mode, so it is not locked when scanner runs a job (#955)

Co-authored-by: Konstantin Koval <kkb@ukr.net>
This commit is contained in:
Kostiantyn 2024-05-31 11:32:47 +03:00 committed by GitHub
parent 7c7089e320
commit d47bca280e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -63,6 +63,8 @@ func GetSqliteAddress(path string) (*url.URL, error) {
queryValues.Add("cache", "shared")
queryValues.Add("mode", "rwc")
// queryValues.Add("_busy_timeout", "60000") // 1 minute
queryValues.Add("_journal_mode", "WAL") // Write-Ahead Logging (WAL) mode
queryValues.Add("_locking_mode", "NORMAL") // allows concurrent reads and writes
address.RawQuery = queryValues.Encode()
// log.Panicf("%s", address.String())