aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/rspamadm
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-07-19 12:43:04 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-07-19 12:43:04 +0100
commitd9df8bb5bb5e5404ea0bfb37f0612465b10545f8 (patch)
treef30f324aa2d1e55dade30857783ab714319191f4 /lualib/rspamadm
parent49b87f8977ab0a2efe1865b522917c3436a42916 (diff)
downloadrspamd-d9df8bb5bb5e5404ea0bfb37f0612465b10545f8.tar.gz
rspamd-d9df8bb5bb5e5404ea0bfb37f0612465b10545f8.zip
[Minor] Fix version check in configwizard
Issue: #2357
Diffstat (limited to 'lualib/rspamadm')
-rw-r--r--lualib/rspamadm/configwizard.lua21
1 files changed, 5 insertions, 16 deletions
diff --git a/lualib/rspamadm/configwizard.lua b/lualib/rspamadm/configwizard.lua
index 10134c575..fb4caf20c 100644
--- a/lualib/rspamadm/configwizard.lua
+++ b/lualib/rspamadm/configwizard.lua
@@ -406,21 +406,10 @@ end
return ver
]]
- conn:add_cmd('EVAL', {lua_script, '1', symbol_ham})
- local _,ver_ham = conn:exec()
+ conn:add_cmd('EVAL', {lua_script, '1', 'RS'})
+ local _,ver = conn:exec()
- conn:add_cmd('EVAL', {lua_script, '1', symbol_spam})
- local _,ver_spam = conn:exec()
-
- -- If one of the classes is missing we still can convert the other one
- if ver_ham == 0 and ver_spam == 0 and ver_ham ~= ver_spam then
- printf("Current statistics versions do not match: %s -> %s, %s -> %s",
- symbol_ham, ver_ham, symbol_spam, ver_spam)
- printf("Cannot convert statistics")
- return false
- end
-
- return true,tonumber(ver_ham)
+ return true,tonumber(ver)
end
local function check_expire(conn)
@@ -454,8 +443,8 @@ return ttl
if not r then return false end
if ver ~= 2 then
if not ver then
- printf('Key "%s_version" has not been found in Redis for %s/%s',
- symbol_ham)
+ printf('Key "RS_version" has not been found in Redis for %s/%s',
+ symbol_ham, symbol_spam)
else
printf("You are using an old schema version: %s for %s/%s",
ver, symbol_ham, symbol_spam)