Skip to content

Commit

Permalink
Fix Deprecated Redis Command
Browse files Browse the repository at this point in the history
  • Loading branch information
onjik committed Apr 6, 2024
1 parent d722898 commit 197bbd8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ end
--redis.log(redis.LOG_WARNING, "new_tokens " .. new_tokens)

if ttl > 0 then
redis.call("setex", tokens_key, ttl, new_tokens)
redis.call("setex", timestamp_key, ttl, now)
redis.call("set", tokens_key, new_tokens, "ex", ttl)
redis.call("set", timestamp_key, now, "ex", ttl)
end

-- return { allowed_num, new_tokens, capacity, filled_tokens, requested, new_tokens }
Expand Down

0 comments on commit 197bbd8

Please sign in to comment.