From 3c4d37339225ea645f0385aeee1b86238ec41f7c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 11 Nov 2019 15:30:12 +0000 Subject: [Feature] Allow to limit maps per specific worker --- src/rspamd_proxy.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/rspamd_proxy.c') diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index 737fff608..ae51e3e5b 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -2297,8 +2297,14 @@ start_rspamd_proxy (struct rspamd_worker *worker) rspamd_worker_init_controller (worker, NULL); } else { - rspamd_map_watch (worker->srv->cfg, ctx->event_loop, ctx->resolver, - worker, 0); + if (ctx->has_self_scan) { + rspamd_map_watch (worker->srv->cfg, ctx->event_loop, ctx->resolver, + worker, RSPAMD_MAP_WATCH_SCANNER); + } + else { + rspamd_map_watch (worker->srv->cfg, ctx->event_loop, ctx->resolver, + worker, RSPAMD_MAP_WATCH_WORKER); + } } rspamd_lua_run_postloads (ctx->cfg->lua_state, ctx->cfg, ctx->event_loop, -- cgit v1.2.3