remove unused method

This commit is contained in:
Lunny Xiao 2017-09-26 13:25:50 +08:00
parent 0426351a9b
commit fb7aec67b5
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
2 changed files with 1 additions and 6 deletions

View File

@ -1587,8 +1587,3 @@ func (engine *Engine) BufferSize(size int) *Session {
session.isAutoClose = true
return session.BufferSize(size)
}
//Stats return the number of open connections to the database
func (engine *Engine) Stats() int {
return engine.DB().Stats().OpenConnections
}

View File

@ -135,7 +135,7 @@ func (policy *LeastConnPolicy) Slave(g *EngineGroup) *Engine {
connections := 0
idx := 0
for i, _ := range slaves {
open_connections := slaves[i].Stats()
open_connections := slaves[i].DB().Stats().OpenConnections
if i == 0 {
connections = open_connections
idx = i