struct event_base *ev_base;
struct event log_ev;
struct rspamd_worker_lua_script *scripts;
+ struct rspamd_dns_resolver *resolver;
lua_State *L;
gint pair[2];
};
ctx->cfg = worker->srv->cfg;
ctx->scripts = worker->cf->scripts;
ctx->L = ctx->cfg->lua_state;
+ ctx->resolver = dns_resolver_init (worker->srv->logger,
+ ctx->ev_base,
+ worker->srv->cfg);
+ rspamd_upstreams_library_config (worker->srv->cfg, ctx->cfg->ups_ctx,
+ ctx->ev_base, ctx->resolver->r);
DL_COUNT (worker->cf->scripts, tmp, nscripts);
msg_info ("started log_helper worker with %d scripts", nscripts);
if learn_spam then k = 'spam' else k = 'ham' end
local function can_train_cb(err, data)
- rspamd_logger.errx('hui')
if not err and tonumber(data) > 0 then
local learn_data = symbols_to_fann_vector(
map(function(r) return r[1] end, results),
end
end
- rspamd_logger.errx('pizda: %s %s %s %s', redis_can_train_sha, fname, tostring(max_trains), k)
redis_make_request(ev_base,
rspamd_config,
nil,