aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamd.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-16 11:45:52 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-16 11:45:52 +0100
commitc24681aa25efaffa4eb43ca9bdf4a7f0009082a5 (patch)
tree6298c1fa21004be19ebd306d92aa547e27b172fa /src/rspamd.c
parent730437924bfc1a20519d45d60dbc5213c0a2d4ab (diff)
downloadrspamd-c24681aa25efaffa4eb43ca9bdf4a7f0009082a5.tar.gz
rspamd-c24681aa25efaffa4eb43ca9bdf4a7f0009082a5.zip
[Minor] Allow to set negative number of workers to disable some worker
Diffstat (limited to 'src/rspamd.c')
-rw-r--r--src/rspamd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rspamd.c b/src/rspamd.c
index abc15ead9..c22afe861 100644
--- a/src/rspamd.c
+++ b/src/rspamd.c
@@ -508,6 +508,12 @@ spawn_worker_type (struct rspamd_main *rspamd_main, struct event_base *ev_base,
{
gint i;
+ if (cf->count < 0) {
+ msg_info_main ("skip spawning of worker %s: disabled in configuration",
+ cf->worker->name);
+
+ return;
+ }
if (cf->worker->flags & RSPAMD_WORKER_UNIQUE) {
if (cf->count > 1) {
msg_warn_main (