数据库操作优化

This commit is contained in:
hoteas 2022-08-17 16:42:46 +08:00
parent 60f222b011
commit 432d59d483

View File

@ -13,7 +13,6 @@ import (
"reflect" "reflect"
"sort" "sort"
"strings" "strings"
"time"
) )
type HoTimeDB struct { type HoTimeDB struct {
@ -315,7 +314,7 @@ func (that *HoTimeDB) InitDb(err ...*Error) *Error {
e := that.SlaveDB.Ping() e := that.SlaveDB.Ping()
that.LastErr.SetError(e) that.LastErr.SetError(e)
} }
that.DB.SetConnMaxLifetime(time.Second) //that.DB.SetConnMaxLifetime(time.Second)
return that.LastErr return that.LastErr
} }