diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-06-19 08:15:52 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-06-19 08:15:52 +0100 |
commit | 8fb06a8fe1ec7e3c96baa98085b7da6bbb07db03 (patch) | |
tree | b394fa1320e479f29a7f4e09e8c65e92e47e18ef /src/rspamd.c | |
parent | 9cfaba2d31af21c5f614b923563b37246f5a7566 (diff) | |
download | rspamd-8fb06a8fe1ec7e3c96baa98085b7da6bbb07db03.tar.gz rspamd-8fb06a8fe1ec7e3c96baa98085b7da6bbb07db03.zip |
[Feature] Allow to disable specific workers in the config
Diffstat (limited to 'src/rspamd.c')
-rw-r--r-- | src/rspamd.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); } |