mscb402 commented on code in PR #8578:
URL: https://github.com/apache/apisix/pull/8578#discussion_r1061160176


##########
apisix/plugins/limit-count/limit-count-redis.lua:
##########
@@ -85,27 +70,80 @@ function _M.incoming(self, key)
         -- core.log.info(" err: ", err)
         return nil, err
     end
+    return red, nil
+end
+
+function _M.new(plugin_name, limit, window, conf)
+    assert(limit > 0 and window > 0)
+
+    local self = {
+        limit = limit,
+        window = window,
+        conf = conf,
+        plugin_name = plugin_name,
+    }
+    return setmetatable(self, mt)
+end
+
+function _M.set_endtime(self,key,time_window)

Review Comment:
   yes, removed



##########
apisix/plugins/limit-count/limit-count-redis-cluster.lua:
##########
@@ -91,16 +92,18 @@ function _M.incoming(self, key)
     local window = self.window
     key = self.plugin_name .. tostring(key)
 
-    local remaining, err = red:eval(script, 1, key, limit, window)
+    local res, err = red:eval(script, 1, key, limit, window)
+    local remaining = res[1]

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to