forked from golang/hotime
数据库操作优化
This commit is contained in:
parent
60f222b011
commit
432d59d483
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user