commit 7ba5acb: [Minor] Neural: Fix for passthrough
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Jul 9 15:42:03 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-07-09 16:34:31 +0100
URL: https://github.com/rspamd/rspamd/commit/7ba5acbc01a5b5bdb436df1c57cf2c6c86897838
[Minor] Neural: Fix for passthrough
---
src/plugins/lua/neural.lua | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua
index 9894ce4df..815e1ddf0 100644
--- a/src/plugins/lua/neural.lua
+++ b/src/plugins/lua/neural.lua
@@ -356,11 +356,6 @@ local function ann_push_task_result(rule, task, verdict, score, set)
local skip_reason = 'unknown'
if train_opts.autotrain then
- if verdict == 'passthrough' then
- lua_util.debugm(N, task, 'ignore task as its verdict is %s(%s)',
- verdict, score)
- end
-
if train_opts.spam_score then
learn_spam = score >= train_opts.spam_score
@@ -1071,7 +1066,14 @@ local function ann_push_vector(task)
lua_util.debugm(N, task, 'do not push data for manual scan')
return
end
+
local verdict,score = lua_util.get_task_verdict(task)
+
+ if verdict == 'passthrough' then
+ lua_util.debugm(N, task, 'ignore task as its verdict is %s(%s)',
+ verdict, score)
+ end
+
for _,rule in pairs(settings.rules) do
local set = get_rule_settings(task, rule)
More information about the Commits
mailing list