From e2e77516b8d6dd4a896d4ae3468069d8393789ca Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 22 Jul 2016 17:09:19 +0100 Subject: [PATCH] [Feature] Allow to disable some modules from common redis setup --- src/lua/global_functions.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lua/global_functions.lua b/src/lua/global_functions.lua index 6f8576dba..0eb461496 100644 --- a/src/lua/global_functions.lua +++ b/src/lua/global_functions.lua @@ -81,6 +81,17 @@ function rspamd_parse_redis_server(module_name) else ret = try_load_redis_servers(opts) + if opts['disabled_modules'] then + for _,v in ipairs(opts['disabled_modules']) do + if v == module_name then + logger.infox(rspamd_config, "NOT using default redis server for module %s: it is disabled", + module_name) + + return nil + end + end + end + if ret then logger.infox(rspamd_config, "using default redis server for module %s", module_name) -- 2.39.5