mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 00:33:14 +00:00
limit number of db connections
This commit is contained in:
parent
d90c05d6c7
commit
4dadbbd178
@ -83,6 +83,8 @@ func New(path string, logger *log.Logger) (*Storage, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
db.SetMaxOpenConns(1)
|
||||
|
||||
if initialize {
|
||||
if _, err := db.Exec(initQuery); err != nil {
|
||||
return nil, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user