log redis pool stats when connect error
This commit is contained in:
parent
405167719f
commit
964a1dbd9b
2
model.go
2
model.go
@ -133,7 +133,7 @@ func RedisOf(name string) redis.Conn {
|
|||||||
var conn, err = m.redisPool.GetContext(ctx)
|
var conn, err = m.redisPool.GetContext(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cancelFunc()
|
cancelFunc()
|
||||||
log.Warningf("get redis connect from pool failed, err:%s", err)
|
log.Warningf("get redis connect from pool failed, err:[%s], pool stats:[%+v]", err, m.redisPool.Stats)
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
defer cancelFunc()
|
defer cancelFunc()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user