[2] = {},
[3] = {}
}
+local settings_ids = {}
local settings_initialized = false
local max_pri = 0
local rspamd_logger = require "rspamd_logger"
end
end
+ local settings_id = task:get_request_header('settings-id')
+ if settings_id and settings_initialized then
+ local elt = settings_ids[settings_id]
+ if elt and elt['apply'] then
+ task:set_settings(elt['apply'])
+
+ return true
+ end
+ end
+
return false
end
-- Now we must process actions
if elt['symbols'] then out['symbols'] = elt['symbols'] end
+ if elt['id'] then
+ out['id'] = elt['id']
+ settings[elt['id']] = out
+ end
+
if elt['apply'] then
-- Just insert all metric results to the action key
out['apply'] = elt['apply']
-- clear all settings
max_pri = 0
local nrules = 0
+ settings_ids = {}
for k,v in pairs(settings) do settings[k]={} end
-- fill new settings by priority
for_each(function(k, v)