commit db72213: Merge pull request #3016 from CAPSLOCK2000/set_redis_sentinel_masters_pattern

GitHub noreply at github.com
Mon Aug 26 17:21:07 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-08-26 18:15:10 +0100
URL: https://github.com/rspamd/rspamd/commit/db7221371cfde0b0cd7b9fef48c76dae51bf7f3c (HEAD -> master)

Merge pull request #3016 from CAPSLOCK2000/set_redis_sentinel_masters_pattern
[Minor] Actually set sentinel_masters_pattern.

 lualib/lua_redis.lua | 5 +++++
 1 file changed, 5 insertions(+)

diff --combined lualib/lua_redis.lua
index 10aa9e8c0,78235a02a..d607c68dc
--- a/lualib/lua_redis.lua
+++ b/lualib/lua_redis.lua
@@@ -125,7 -125,7 +125,7 @@@ local function redis_query_sentinel(ev_
          for _,s in ipairs(slave_result) do
            local slave = flatten_redis_table(s)
            lutil.debugm(N, rspamd_config,
 -              'found slave form master %s with ip %s and port %s',
 +              'found slave for master %s with ip %s and port %s',
                v.name, slave.ip, slave.port)
            -- Wrap IPv6-adresses in brackets
            if (slave.ip:match(":")) then
@@@ -317,6 -317,11 +317,11 @@@ local function process_redis_opts(optio
    if not redis_params.sentinels and options.sentinels then
      redis_params.sentinels = options.sentinels
    end
+ 
+   if options['sentinel_masters_pattern'] and not redis_params['sentinel_masters_pattern'] then
+     redis_params['sentinel_masters_pattern'] = options['sentinel_masters_pattern']
+   end
+ 
  end
  
  local function enrich_defaults(rspamd_config, module, redis_params)


More information about the Commits mailing list