mirror of
https://github.com/duanhf2012/origin.git
synced 2026-04-11 11:07:30 +08:00
数据保护
This commit is contained in:
@@ -111,6 +111,10 @@ func (slf *RedisModule) GoTask(fc Func) error {
|
||||
|
||||
// GetConn ...
|
||||
func (slf *RedisModule) getConn() (redis.Conn, error) {
|
||||
if slf.redispool == nil {
|
||||
service.GetLogger().Printf(service.LEVER_FATAL, "Not Init RedisModule")
|
||||
return nil, fmt.Errorf("Not Init RedisModule")
|
||||
}
|
||||
conn := slf.redispool.Get()
|
||||
if conn == nil {
|
||||
service.GetLogger().Printf(service.LEVER_ERROR, "Cannot get connection")
|
||||
|
||||
Reference in New Issue
Block a user