sqlite set busy timeout to 10s rather than 1s (#162)

This commit is contained in:
Thibault "bui" Koechlin 2020-07-30 11:39:06 +02:00 committed by GitHub
parent 0f2733418a
commit b19046939c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,7 +66,7 @@ func NewDatabase(cfg map[string]string) (*Context, error) {
}
if cfg["type"] == "sqlite" {
c.Db, err = gorm.Open("sqlite3", cfg["db_path"]+"?_busy_timeout=1000")
c.Db, err = gorm.Open("sqlite3", cfg["db_path"]+"?_busy_timeout=10000")
if err != nil {
return nil, fmt.Errorf("failed to open %s : %s", cfg["db_path"], err)
}