fix for sqlite transactional concurrency issue (#40)

This commit is contained in:
Michael Quigley 2022-10-03 13:53:59 -04:00
parent be41138929
commit 99bf504301
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -32,6 +32,7 @@ func Open(cfg *Config) (*Store, error) {
if err != nil {
return nil, errors.Wrapf(err, "error opening database '%v'", cfg.Path)
}
dbx.DB.SetMaxOpenConns(1)
logrus.Infof("opened database '%v'", cfg.Path)
dbx.MapperFunc(strcase.ToSnake)
store := &Store{cfg: cfg, db: dbx}