加入卸载依赖逻辑

This commit is contained in:
marvzhang
2020-01-02 17:38:39 +08:00
parent 836dc12703
commit 53c77eb6e9
8 changed files with 237 additions and 92 deletions

View File

@@ -114,11 +114,11 @@ func (r *Redis) BRPop(collection string, timeout int) (string, error) {
c := r.pool.Get()
defer utils.Close(c)
value, err2 := redis.String(c.Do("BRPOP", collection, timeout))
if err2 != nil {
return value, err2
values, err := redis.Strings(c.Do("BRPOP", collection, timeout))
if err != nil {
return "", err
}
return value, nil
return values[1], nil
}
func NewRedisPool() *redis.Pool {