From ccdfb8d70f0c1ec98c84ef088c90b822a9fe4056 Mon Sep 17 00:00:00 2001 From: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com> Date: Thu, 3 Sep 2020 21:20:14 +0200 Subject: [PATCH] [v2] Redis Lists: default to list type if none specified (#1075) Signed-off-by: Zbynek Roubalik --- pkg/scalers/redis_scaler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/scalers/redis_scaler.go b/pkg/scalers/redis_scaler.go index 04ba277be71..38fc54958e6 100644 --- a/pkg/scalers/redis_scaler.go +++ b/pkg/scalers/redis_scaler.go @@ -215,7 +215,7 @@ func getRedisListLength(ctx context.Context, address string, password string, li var cmd *redis.IntCmd switch listType.Val() { - case "list": + case "list", "none": cmd = client.LLen(listName) case "set": cmd = client.SCard(listName) @@ -228,7 +228,7 @@ func getRedisListLength(ctx context.Context, address string, password string, li } if cmd == nil { - return -1, fmt.Errorf("list must be of type:list,set,hash,zset but was %s", listType.Val()) + return -1, fmt.Errorf("list must be of type: list, none, set, hash or zset but was %s", listType.Val()) } if cmd.Err() != nil { return -1, cmd.Err()