-
Notifications
You must be signed in to change notification settings - Fork 765
Open
Description
文件:admin/runtime.lua 186行
local pfunc = function()
local runtimeGroupMod = runtimeGroupModule:new(database, runtimeLib)
return runtimeGroupMod:del(hostname)
end
local status, info = xpcall(pfunc, handler)
if not status then
local response = doerror(info)
ngx.say(response)
return false
end
local pfunc = function()
local policyMod = policyModule:new(database, policyLib)
local policy = policyMod:get(policyId)
local divtype = policy.divtype
local divdata = policy.divdata
if divtype == ngx.null or divdata == ngx.null then
error{ERRORINFO.POLICY_BLANK_ERROR, 'policy NO '..policyId}
end
if not divtypes[divtype] then
end
local prefix = hostname .. ':first'
local divModulename = table.concat({'abtesting', 'diversion', divtype}, '.')
local divDataKey = table.concat({policyLib, policyId, fields.divdata}, ':')
local userInfoModulename = table.concat({'abtesting', 'userinfo', divtypes[divtype]}, '.')
local runtimeMod = runtimeModule:new(database, runtimeLib)
runtimeMod:set(prefix, divModulename, divDataKey, userInfoModulename)
local divSteps = runtimeLib .. ':' .. hostname .. ':' .. fields.divsteps
local ok, err = database:set(divSteps, 1)
if not ok then error{ERRORINFO.REDIS_ERROR, err} end
end
Metadata
Metadata
Assignees
Labels
No labels