aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_redis.lua
diff options
context:
space:
mode:
authorMikhail Galanin <mgalanin@mimecast.com>2018-09-10 15:17:14 +0100
committerMikhail Galanin <mgalanin@mimecast.com>2018-09-10 15:17:14 +0100
commit1b5cef0e884b49430d5cac902a366703beef5439 (patch)
treef829cfdbb84f749e68be56892cbd4fc4df58e25b /lualib/lua_redis.lua
parentbe2a17a180e84fac41c7f4c79bdafbacbd6e067c (diff)
downloadrspamd-1b5cef0e884b49430d5cac902a366703beef5439.tar.gz
rspamd-1b5cef0e884b49430d5cac902a366703beef5439.zip
[Minor] Updated Lua to comply the new call semantic
Diffstat (limited to 'lualib/lua_redis.lua')
-rw-r--r--lualib/lua_redis.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua
index 33757b154..3c7bcd3b6 100644
--- a/lualib/lua_redis.lua
+++ b/lualib/lua_redis.lua
@@ -961,10 +961,16 @@ end
exports.exec_redis_script = exec_redis_script
-local function redis_connect_sync(redis_params, is_write, key, cfg)
+local function redis_connect_sync(redis_params, is_write, key, cfg, ev_base)
if not redis_params then
return false,nil
end
+ if not cfg then
+ cfg = rspamd_config
+ end
+ if not ev_base then
+ ev_base = rspamadm_ev_base
+ end
local rspamd_redis = require "rspamd_redis"
local addr
@@ -990,8 +996,13 @@ local function redis_connect_sync(redis_params, is_write, key, cfg)
local options = {
host = addr:get_addr(),
timeout = redis_params['timeout'],
+ config = cfg,
+ ev_base = ev_base
}
+ for k,v in pairs(redis_params) do
+ options[k] = v
+ end
local ret,conn = rspamd_redis.connect_sync(options)
if not ret then