From 8fb06a8fe1ec7e3c96baa98085b7da6bbb07db03 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 19 Jun 2017 08:15:52 +0100 Subject: [Feature] Allow to disable specific workers in the config --- src/rspamd.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/rspamd.c') diff --git a/src/rspamd.c b/src/rspamd.c index 828720cae..080ceef6c 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -550,6 +550,14 @@ spawn_workers (struct rspamd_main *rspamd_main, struct event_base *ev_base) msg_err_main ("type of worker is unspecified, skip spawning"); } else { + if (!cf->enabled) { + msg_info_main ("worker of type %s is disabled in the config, " + "skip spawning", g_quark_to_string (cf->type)); + cur = g_list_next (cur); + + continue; + } + if (cf->worker->flags & RSPAMD_WORKER_ALWAYS_START) { g_ptr_array_add (seen_mandatory_workers, cf->worker); } -- cgit v1.2.3