diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-08 17:52:23 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-08 17:52:23 +0000 |
commit | 39a38ffe77ffe812775095cad53784b185b304b7 (patch) | |
tree | b8b8ff457297c86c71f90487891948749804428e | |
parent | 3b88cf246be7cd4bc72a7667fdffa3c8f5a04411 (diff) | |
download | rspamd-39a38ffe77ffe812775095cad53784b185b304b7.tar.gz rspamd-39a38ffe77ffe812775095cad53784b185b304b7.zip |
[Fix] Fix ANN loading logic
-rw-r--r-- | src/plugins/lua/neural.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua index e0bab70f3..216a2800d 100644 --- a/src/plugins/lua/neural.lua +++ b/src/plugins/lua/neural.lua @@ -1041,7 +1041,10 @@ else for _,rule in pairs(settings.rules) do load_scripts(rule.redis) rspamd_config:add_on_load(function(cfg, ev_base, worker) - check_anns(rule, cfg, ev_base) + rspamd_config:add_periodic(ev_base, 0.0, + function(_, _) + return check_anns(rule, cfg, ev_base) + end) if worker:is_primary_controller() then -- We also want to train neural nets when they have enough data |