Skip to content

Commit

Permalink
[Minor] rspamadm clickhouse neural_train : avoid UCL parser re-use
Browse files Browse the repository at this point in the history
  • Loading branch information
fatalbanana committed Apr 21, 2021
1 parent 2944572 commit db6658e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lualib/rspamadm/clickhouse.lua
Expand Up @@ -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')
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit db6658e

Please sign in to comment.