From 9e1bcc12c2238e48ea246875ea8090cfc24e25cf Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 20 Mar 2018 18:35:45 +0000 Subject: [PATCH] [Minor] Fix clickhouse attrs --- src/plugins/lua/clickhouse.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/lua/clickhouse.lua b/src/plugins/lua/clickhouse.lua index 652bf4fef..d64e69807 100644 --- a/src/plugins/lua/clickhouse.lua +++ b/src/plugins/lua/clickhouse.lua @@ -272,7 +272,7 @@ local function clickhouse_send_data(task) upstream:fail() else rspamd_logger.infox(task, "sent %s rows of %s to clickhouse server %s", - how_many, what, ip_addr) + how_many - 1, what, ip_addr) upstream:ok() end end @@ -282,8 +282,8 @@ local function clickhouse_send_data(task) if not rspamd_http.request({ task = task, url = connect_prefix .. ip_addr, - body = gen_http_cb('generic data', #rows), - callback = http_cb, + body = body, + callback = gen_http_cb('generic data', #rows), gzip = settings.use_gzip, mime_type = 'text/plain', timeout = settings['timeout'], -- 2.39.5