diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-08-26 11:57:23 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-08-26 11:57:23 +0200 |
commit | 3f3ab3c9a8ca8922c36720a567d417d68271ad91 (patch) | |
tree | d091e1fdeed2897c645463dfe238012b332da7a8 /src/plugins/lua/metric_exporter.lua | |
parent | d0f96a765d87dd6fcd24c3448e311aac257b67ff (diff) | |
download | rspamd-3f3ab3c9a8ca8922c36720a567d417d68271ad91.tar.gz rspamd-3f3ab3c9a8ca8922c36720a567d417d68271ad91.zip |
[Minor] Use controller for single-instance tasks
Diffstat (limited to 'src/plugins/lua/metric_exporter.lua')
-rw-r--r-- | src/plugins/lua/metric_exporter.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/metric_exporter.lua b/src/plugins/lua/metric_exporter.lua index 4951e6594..d104c4b9b 100644 --- a/src/plugins/lua/metric_exporter.lua +++ b/src/plugins/lua/metric_exporter.lua @@ -169,8 +169,8 @@ end if not configure_metric_exporter() then return end rspamd_config:add_on_load(function (_, ev_base, worker) - -- Exit unless we're the first 'normal' worker - if not (worker:get_name() == 'normal' and worker:get_index() == 0) then return end + -- Exit unless we're the first 'controller' worker + if not (worker:get_name() == 'controller' and worker:get_index() == 0) then return end -- Persist mempool variable to statefile on shutdown rspamd_config:register_finish_script(function () local stamp = pool:get_variable(VAR_NAME, 'double') |