mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 08:01:29 +00:00
orm add missed SetMaxIdleConns
This commit is contained in:
parent
eb06435f23
commit
deb00809a5
@ -118,6 +118,8 @@ func RegisterDataBase(name, driverName, dataSource string, maxIdle int) {
|
|||||||
goto end
|
goto end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
al.DB.SetMaxIdleConns(al.MaxIdle)
|
||||||
|
|
||||||
err = al.DB.Ping()
|
err = al.DB.Ping()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = fmt.Errorf("register db `%s`, %s", name, err.Error())
|
err = fmt.Errorf("register db `%s`, %s", name, err.Error())
|
||||||
|
Loading…
Reference in New Issue
Block a user