From bafed907e98d78a123297eab1dcb422529cfecad Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Mon, 2 Jan 2023 13:17:18 -0800 Subject: [PATCH] Fix redis script error --- internal/rdb/rdb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rdb/rdb.go b/internal/rdb/rdb.go index 7b25f15..bfe4ea3 100644 --- a/internal/rdb/rdb.go +++ b/internal/rdb/rdb.go @@ -379,7 +379,7 @@ if redis.call("ZREM", KEYS[2], ARGV[1]) == 0 then return redis.error_reply("NOT FOUND") end if redis.call("ZADD", KEYS[3], ARGV[3], ARGV[1]) ~= 1 then - redis.redis.error_reply("INTERNAL") + return redis.error_reply("INTERNAL") end redis.call("HSET", KEYS[4], "msg", ARGV[4], "state", "completed") local n = redis.call("INCR", KEYS[5]) @@ -416,7 +416,7 @@ if redis.call("ZREM", KEYS[2], ARGV[1]) == 0 then return redis.error_reply("NOT FOUND") end if redis.call("ZADD", KEYS[3], ARGV[3], ARGV[1]) ~= 1 then - redis.redis.error_reply("INTERNAL") + return redis.error_reply("INTERNAL") end redis.call("HSET", KEYS[4], "msg", ARGV[4], "state", "completed") local n = redis.call("INCR", KEYS[5])