commit 1ca69a5: [Minor] Call clickhouse periodic merely for scanners
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Nov 6 14:21:07 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-11-06 14:18:23 +0000
URL: https://github.com/rspamd/rspamd/commit/1ca69a5c735892c97864d92dce2334e68ca22a98 (HEAD -> master)
[Minor] Call clickhouse periodic merely for scanners
---
src/plugins/lua/clickhouse.lua | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/plugins/lua/clickhouse.lua b/src/plugins/lua/clickhouse.lua
index 966543e3e..442aee4c1 100644
--- a/src/plugins/lua/clickhouse.lua
+++ b/src/plugins/lua/clickhouse.lua
@@ -1279,8 +1279,10 @@ if opts then
end)
-- Create tables on load
rspamd_config:add_on_load(function(cfg, ev_base, worker)
- rspamd_config:add_periodic(ev_base, 0,
- clickhouse_maybe_send_data_periodic, true)
+ if worker:is_scanner() then
+ rspamd_config:add_periodic(ev_base, 0,
+ clickhouse_maybe_send_data_periodic, true)
+ end
if worker:is_primary_controller() then
local upstreams = settings.upstream:all_upstreams()
More information about the Commits
mailing list