From f881058687019b08eb8a132ffb7a239f073b7d46 Mon Sep 17 00:00:00 2001 From: bestgopher <84328409@qq.com> Date: Fri, 8 May 2020 15:29:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E7=82=B9=E5=B0=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/database/redis.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/database/redis.go b/backend/database/redis.go index bc6b4982..d93491f8 100644 --- a/backend/database/redis.go +++ b/backend/database/redis.go @@ -107,7 +107,7 @@ func (r *Redis) HKeys(collection string) ([]string, error) { c := r.pool.Get() defer utils.Close(c) - value, err2 := redis.Strings(c.Do("HKeys", collection)) + value, err2 := redis.Strings(c.Do("HKEYS", collection)) if err2 != nil { log.Error(err2.Error()) debug.PrintStack() @@ -208,7 +208,7 @@ func (r *Redis) Lock(lockKey string) (int64, error) { debug.PrintStack() return 0, err } - if err == nil && ok == nil { + if ok == nil { log.Errorf("the lockKey is locked: key=%s", lockKey) return 0, errors.New("the lockKey is locked") }