diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-04-21 09:57:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-21 09:57:43 +0100 |
commit | e1c631ca5364f1694e1633f69edd867e62fc26c4 (patch) | |
tree | e6df00e2a20fd621ebc40ddda9e9cca49f4961af | |
parent | a0c8f40933a55ac8d1cd4c95d7b3f2abbc8974c0 (diff) | |
parent | db6658e9ac8352bf43261b8e7f69200cd667bdb6 (diff) | |
download | rspamd-e1c631ca5364f1694e1633f69edd867e62fc26c4.tar.gz rspamd-e1c631ca5364f1694e1633f69edd867e62fc26c4.zip |
Merge pull request #3725 from fatalbanana/neural_ucl
[Minor] rspamadm clickhouse neural_train : avoid UCL parser re-use
-rw-r--r-- | lualib/rspamadm/clickhouse.lua | 2 |
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)) |