diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-02-26 16:04:58 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-02-26 16:04:58 +0000 |
commit | 714ebee786d239c68aff8356b199eca9d14b8794 (patch) | |
tree | b831f711c9c40e6675770ed45a8e7c5fa15d06d3 /src/plugins/lua/fuzzy_collect.lua | |
parent | 4d386d0c689ad4607c67dcd634e53aadea940613 (diff) | |
download | rspamd-714ebee786d239c68aff8356b199eca9d14b8794.tar.gz rspamd-714ebee786d239c68aff8356b199eca9d14b8794.zip |
[Minor] Add common methods to find a primary controller
Diffstat (limited to 'src/plugins/lua/fuzzy_collect.lua')
-rw-r--r-- | src/plugins/lua/fuzzy_collect.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/lua/fuzzy_collect.lua b/src/plugins/lua/fuzzy_collect.lua index b5dae4e20..57a4a2fa6 100644 --- a/src/plugins/lua/fuzzy_collect.lua +++ b/src/plugins/lua/fuzzy_collect.lua @@ -178,7 +178,7 @@ if opts and type(opts) == 'table' then if sane_config then rspamd_config:add_on_load(function(_, ev_base, worker) - if worker:get_name() == 'controller' and worker:get_index() == 0 then + if worker:is_primary_controller() then rspamd_config:add_periodic(ev_base, 0.0, function(_cfg, _ev_base) return collect_fuzzy_hashes(_cfg, _ev_base) |