Database mutex

This commit is contained in:
Joona Hoikkala 2016-11-18 12:09:43 +02:00
parent 0087d67533
commit 8d21f32d1e

1
db.go
View File

@ -40,6 +40,7 @@ func (d *Database) Init(engine string, connection string) error {
return err
}
d.DB = db
d.DB.SetMaxOpenConns(1)
_, err = d.DB.Exec(recordsTable)
if err != nil {
return err