local res = ngx.location.capture("/set_redis",{
args = { key = scrollId, value = esCluster, time = getTime }
})
--ngx.log(ngx.ERR,"insert redis result:"..res.body)
local result,error = ngx.re.match(res.body,"MOVED")
if result then
local IPstart, IPend = string.find(res.body, "%d+%.%d+%.%d+%.%d+:%d+")
local getIP = string.sub(res.body, IPstart, IPend)
--ngx.log(ngx.ERR,res.body.."--->"..getIP)
local res = ngx.location.capture("/set_redis_for_redis3",{
args = { key = scrollId, value = esCluster, ipPort = getIP, time= getTime}
})
ngx.log(ngx.ERR,"The second time insert redis result :"..res.body)
end