aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/metric_exporter.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-12-03 13:36:32 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-12-03 16:55:30 +0000
commitf5e2a84b6981cc12f06c908f9af277d13e64e7e8 (patch)
treeb86cc3a6ee0803e86d825240986d2b2efa553758 /src/plugins/lua/metric_exporter.lua
parent12d38f08dd70e39bc0848390d6ec4f1f003ec335 (diff)
downloadrspamd-f5e2a84b6981cc12f06c908f9af277d13e64e7e8.tar.gz
rspamd-f5e2a84b6981cc12f06c908f9af277d13e64e7e8.zip
[Feature] Store plugins state
Diffstat (limited to 'src/plugins/lua/metric_exporter.lua')
-rw-r--r--src/plugins/lua/metric_exporter.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/lua/metric_exporter.lua b/src/plugins/lua/metric_exporter.lua
index d104c4b9b..efb50d586 100644
--- a/src/plugins/lua/metric_exporter.lua
+++ b/src/plugins/lua/metric_exporter.lua
@@ -24,6 +24,7 @@ local logger = require "rspamd_logger"
local mempool = require "rspamd_mempool"
local util = require "rspamd_util"
local tcp = require "rspamd_tcp"
+local lua_util = require "lua_util"
local pool = mempool.create()
local settings = {
@@ -166,7 +167,10 @@ local function configure_metric_exporter()
return backends[be]['configure']()
end
-if not configure_metric_exporter() then return end
+if not configure_metric_exporter() then
+ lua_util.disable_module(N, "config")
+ return
+end
rspamd_config:add_on_load(function (_, ev_base, worker)
-- Exit unless we're the first 'controller' worker