math.randomseed(tostring(os.time()):reverse():sub(1, 7))
action2={13,24}
if (#action2) > 1 then
action2=action2[math.random(#action2)]
print (action2)
end
nginx-lua取后端redis key为数组时的随机取值.
原文:https://blog.51cto.com/13801798/2462768