diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-02-23 14:13:58 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-02-23 14:13:58 +0000 |
commit | 4fda9686da8300e8f187ae784819f8eb040846e5 (patch) | |
tree | b8539fc73d2fe96523b865d7b0320d17486dddaa /lualib/lua_stat.lua | |
parent | 13885fec3a2a84a49687f2d50ce7cbe8723b2af2 (diff) | |
download | rspamd-4fda9686da8300e8f187ae784819f8eb040846e5.tar.gz rspamd-4fda9686da8300e8f187ae784819f8eb040846e5.zip |
[Minor] Move parse_time_interval to lua_util
Diffstat (limited to 'lualib/lua_stat.lua')
-rw-r--r-- | lualib/lua_stat.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lualib/lua_stat.lua b/lualib/lua_stat.lua index a5987f9da..d3a435554 100644 --- a/lualib/lua_stat.lua +++ b/lualib/lua_stat.lua @@ -479,8 +479,9 @@ exports.load_sqlite_config = load_sqlite_config -- A helper method that suggests a user how to configure Redis based -- classifier based on the existing sqlite classifier -local function redis_classifier_from_sqlite(sqlite_classifier) +local function redis_classifier_from_sqlite(sqlite_classifier, expire) local result = { + new_schema = true, backend = 'redis', cache = { backend = 'redis' @@ -495,6 +496,10 @@ local function redis_classifier_from_sqlite(sqlite_classifier) } } + if expire then + result.expire = expire + end + return {classifier = {bayes = result}} end |