]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Remove unused variables in neural controller
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 19 Jan 2026 20:22:35 +0000 (20:22 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 19 Jan 2026 20:22:35 +0000 (20:22 +0000)
Remove unused ev_base and ann_key variables to fix luacheck warnings.

rules/controller/neural.lua

index 4c8c931d0f066b5679c3ca5e5b783642b4f1c954..44bf65593dc9ddebea7a2a1d631f8fa00f2184c5 100644 (file)
@@ -408,19 +408,9 @@ local function handle_train(task, conn, req_params)
 
   -- Check pending vectors count
   local pending_key = neural_common.pending_train_key(rule, set)
-  local ev_base = task:get_ev_base()
 
   local function check_and_train(spam_count, ham_count)
     if spam_count > 0 and ham_count > 0 then
-      -- We have vectors in pending, find or create a profile and train
-      local ann_key
-      if set.ann and set.ann.redis_key then
-        ann_key = set.ann.redis_key
-      else
-        -- Create a new profile
-        ann_key = neural_common.new_ann_key(rule, set, 0)
-      end
-
       rspamd_logger.infox(task, 'manual train trigger for %s:%s with %s spam, %s ham vectors',
         rule.prefix, set.name, spam_count, ham_count)