From cab851d4445a1c4e98a6e32a6629a9cf47efb289 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 22 Nov 2016 13:21:07 +0000 Subject: [PATCH] [Minor] Fix variable id -> elt --- src/plugins/lua/fann_redis.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/lua/fann_redis.lua b/src/plugins/lua/fann_redis.lua index e2ac770dc..e73c95a32 100644 --- a/src/plugins/lua/fann_redis.lua +++ b/src/plugins/lua/fann_redis.lua @@ -528,10 +528,10 @@ local function train_fann(_, ev_base, elt) -- Invalidate ANN as it is definitely invalid local function redis_invalidate_cb(_err, _data) if _err then - rspamd_logger.errx(rspamd_config, 'cannot invalidate ANN %s from redis: %s', id, _err) + rspamd_logger.errx(rspamd_config, 'cannot invalidate ANN %s from redis: %s', elt, _err) elseif type(_data) == 'string' then - rspamd_logger.infox(rspamd_config, 'invalidated ANN %s from redis: %s', id, _err) - fanns[id].version = 0 + rspamd_logger.infox(rspamd_config, 'invalidated ANN %s from redis: %s', elt, _err) + fanns[elt].version = 0 end end -- Invalidate ANN @@ -542,7 +542,7 @@ local function train_fann(_, ev_base, elt) true, -- is write redis_invalidate_cb, --callback 'EVALSHA', -- command - {redis_locked_invalidate_sha, 1, gen_fann_prefix(id)} + {redis_locked_invalidate_sha, 1, elt} ) else learning_spawned = true -- 2.39.5