From: Vsevolod Stakhov Date: Tue, 22 Nov 2016 12:13:15 +0000 (+0000) Subject: [Minor] Another fix to symbols change in fann_redis X-Git-Tag: 1.4.1~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c193fe336047574fe15bc5bca268a1fbe9800690;p=thirdparty%2Frspamd.git [Minor] Another fix to symbols change in fann_redis --- diff --git a/src/plugins/lua/fann_redis.lua b/src/plugins/lua/fann_redis.lua index 1cdda8bef7..49aeb113c0 100644 --- a/src/plugins/lua/fann_redis.lua +++ b/src/plugins/lua/fann_redis.lua @@ -500,7 +500,8 @@ local function train_fann(_, ev_base, elt) -- Now we can train fann local n = rspamd_config:get_symbols_count() + rspamd_count_metatokens() - if not fanns[elt] or not fanns[elt].fann_train then + if not fanns[elt] or not fanns[elt].fann_train + or n ~= fanns[elt].fann_train:get_inputs() then -- Create fann if it does not exist create_train_fann(n, elt) end