aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/rspamadm
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2021-04-21 10:51:41 +0200
committerAndrew Lewis <nerf@judo.za.org>2021-04-21 10:51:41 +0200
commitdb6658e9ac8352bf43261b8e7f69200cd667bdb6 (patch)
tree390bc9d504f6b980204d8385f9cac1f072d77ce6 /lualib/rspamadm
parent2944572017edb0b5660eb311c9342d19c8737387 (diff)
downloadrspamd-db6658e9ac8352bf43261b8e7f69200cd667bdb6.tar.gz
rspamd-db6658e9ac8352bf43261b8e7f69200cd667bdb6.zip
[Minor] rspamadm clickhouse neural_train : avoid UCL parser re-use
Diffstat (limited to 'lualib/rspamadm')
-rw-r--r--lualib/rspamadm/clickhouse.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lualib/rspamadm/clickhouse.lua b/lualib/rspamadm/clickhouse.lua
index f0faff9aa..7f215f6aa 100644
--- a/lualib/rspamadm/clickhouse.lua
+++ b/lualib/rspamadm/clickhouse.lua
@@ -375,7 +375,6 @@ local function handle_neural_train(args)
local this_where -- which class of messages are we collecting data for
local ham_rows, spam_rows = {}, {}
local want_spam, want_ham = true, true -- keep collecting while true
- local ucl_parser = ucl.parser()
-- Try find profile in config
local neural_opts = rspamd_config:get_all_opt('neural')
@@ -403,6 +402,7 @@ local function handle_neural_train(args)
return
end
end
+ local ucl_parser = ucl.parser()
local ok, err = ucl_parser:parse_string(r[args.column_name_vector], 'msgpack')
if not ok then
io.stderr:write(string.format("Couldn't parse [%s]: %s", r[args.column_name_vector], err))