#
zhou zhou
3 天以前 523365960513f297024a419f94b2b42eccd9456f
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