mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
优化redis模块
This commit is contained in:
@@ -192,7 +192,6 @@ func (m *RedisModule) HSetStruct(key string, val interface{}) error {
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
|
||||
_, err = conn.Do("HSET", redis.Args{}.Add(key).AddFlat(val)...)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -1151,3 +1150,9 @@ func (m *RedisModule) Keys(key string) ([]string, error) {
|
||||
}
|
||||
return strs, nil
|
||||
}
|
||||
|
||||
func (m *RedisModule) OnRelease() {
|
||||
if m.redisPool != nil {
|
||||
m.redisPool.Close()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user