]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Neural: Add safe guard for local learning spawning
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 12 Mar 2019 11:29:08 +0000 (11:29 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 12 Mar 2019 11:29:08 +0000 (11:29 +0000)
src/plugins/lua/neural.lua

index 43d7bb12760eae479f415d9d356bd1dbc3ecafcc..4e268962cebe95d16e3eea366572240241d71311 100644 (file)
@@ -680,6 +680,8 @@ local function train_ann(rule, _, ev_base, elt, worker)
             return st
           end
 
+          rule.learning_spawned = true
+
           worker:spawn_process{
             func = train_torch,
             on_complete = ann_trained_torch,