Browse Source

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

Thibault "bui" Koechlin 5 years ago
parent
commit
b19046939c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pkg/database/database.go

+ 1 - 1
pkg/database/database.go

@@ -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)
 		}