rspamd_config:add_on_load(function (_, ev_base, worker)
local processed_symbols, expire_script_sha
- -- Exit unless we're the first 'normal' worker
- if not (worker:get_name() == 'normal' and worker:get_index() == 0) then return end
+ -- Exit unless we're the first 'controller' worker
+ if not (worker:get_name() == 'controller' and worker:get_index() == 0) then return end
-- Persist mempool variable to statefile on shutdown
rspamd_config:register_finish_script(function ()
local stamp = pool:get_variable(VAR_NAME, 'double')
end
rspamd_config:add_on_load(function(cfg, ev_base, worker)
load_scripts(cfg, ev_base)
- if not (worker:get_name() == 'normal' and worker:get_index() == 0) then return end
+ if not (worker:get_name() == 'controller' and worker:get_index() == 0) then return end
local rresolver = rspamd_resolver.init(ev_base, rspamd_config)
rspamd_config:register_finish_script(function ()
local stamp = pool:get_variable(VAR_NAME, 'double')
if not configure_metric_exporter() then return end
rspamd_config:add_on_load(function (_, ev_base, worker)
- -- Exit unless we're the first 'normal' worker
- if not (worker:get_name() == 'normal' and worker:get_index() == 0) then return end
+ -- Exit unless we're the first 'controller' worker
+ if not (worker:get_name() == 'controller' and worker:get_index() == 0) then return end
-- Persist mempool variable to statefile on shutdown
rspamd_config:register_finish_script(function ()
local stamp = pool:get_variable(VAR_NAME, 'double')