1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| --- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by gy. --- DateTime: 2021/10/27 20:16 ---
-- 调试配置相关代码,实际使用不需要 start-- --require("mobdebug").start()
local cjson = require 'cjson' local redis = require 'redis' local host = "127.0.0.1" local port = 6379 client = redis.connect(host, port)
redis.call = function(cmd, ...) return assert(load('return client:' .. string.lower(cmd) .. '(...)'))(...) end -- 调试配置相关代码,实际使用不需要 end--
local KEYS = { "test1", "test2" } local ARGV = { "1", '{\"age\":\"23\",\"name\":\"test\"}' }
local value = redis.call("GET", "key1") print(value)
local queueListRedisKey = KEYS[1] print(queueListRedisKey)
local userInfoObj = cjson.decode(ARGV[2]) print(cjson.encode(userInfoObj))
|
If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you !