aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-02-21 16:32:41 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-02-21 16:32:41 +0000
commit992fb2a043ac340615ce14cc459a9bfbabd4d1d5 (patch)
tree0b93070bb43f5af399bdfe000540cb2e0bd23c18
parentd3eb6739d3aa8f542c21679fbbfe44f94cc253cc (diff)
downloadrspamd-992fb2a043ac340615ce14cc459a9bfbabd4d1d5.tar.gz
rspamd-992fb2a043ac340615ce14cc459a9bfbabd4d1d5.zip
[Minor] Fix ANN learn condition
-rw-r--r--src/plugins/lua/fann_redis.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/lua/fann_redis.lua b/src/plugins/lua/fann_redis.lua
index a0953b00c..f57a43466 100644
--- a/src/plugins/lua/fann_redis.lua
+++ b/src/plugins/lua/fann_redis.lua
@@ -780,7 +780,7 @@ local function maybe_train_fanns(cfg, ev_base)
if _err then
rspamd_logger.errx(rspamd_config, 'cannot get FANN trains %s from redis: %s', prefix, _err)
elseif _data and type(_data) == 'number' or type(_data) == 'string' then
- if tonumber(_data) and tonumber(_data) > max_trains then
+ if tonumber(_data) and tonumber(_data) >= max_trains then
rspamd_logger.infox(rspamd_config, 'need to learn ANN %s after %s learn vectors (%s required)',
prefix, tonumber(_data), max_trains)
train_fann(cfg, ev_base, elt)