#
zhou zhou
4 天以前 2812a2504ec3d0a98fa7e6204e6048584723adab
1
2
3
4
5
6
7
8
9
local taskValue = ARGV[1]
local ttl = tonumber(ARGV[2])
 
if redis.call('exists', KEYS[1]) == 1 then
  return 0
end
 
redis.call('psetex', KEYS[1], ttl, taskValue)
return 1