rspamd_config:add_on_load(function(_, ev_base, worker)
if worker:is_scanner() then
rspamd_config:add_periodic(ev_base, 0.0,
- function(cfg, _ev_base)
- check_dynamic_conf(cfg, _ev_base)
+ function(cfg, _)
+ check_dynamic_conf(cfg, ev_base)
return settings.redis_watch_interval
end, true)
end
if smtp_from and smtp_from[1] and smtp_from[1]['addr'] ~= '' then
local mime_from = task:get_from(2)
if not mime_from or not mime_from[1] or
- not (string.lower(mime_from[1]['addr']) == string.lower(smtp_from[1]['addr'])) then
+ (string.lower(mime_from[1]['addr']) ~= string.lower(smtp_from[1]['addr'])) then
task:insert_result(symbol_sender, 1, ((mime_from or E)[1] or E).addr or '', smtp_from[1].addr)
end
end
rspamd_config:add_on_load(function(_, ev_base, worker)
if worker:is_primary_controller() then
rspamd_config:add_periodic(ev_base, 0.0,
- function(_cfg, _ev_base)
- return collect_fuzzy_hashes(_cfg, _ev_base)
+ function(cfg, _)
+ return collect_fuzzy_hashes(cfg, ev_base)
end)
end
end)
local str = rspamd_util.zstd_compress(table.concat(vec, ';'))
local target_key = set.ann.redis_key .. '_' .. learn_type .. '_set'
- local function learn_vec_cb(_err)
- if _err then
+ local function learn_vec_cb(redis_err)
+ if redis_err then
rspamd_logger.errx(task, 'cannot store train vector for %s:%s: %s',
- rule.prefix, set.name, _err)
+ rule.prefix, set.name, redis_err)
else
lua_util.debugm(N, task,
"add train data for ANN rule " ..