]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Luacheck fixes
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 8 Aug 2018 13:08:47 +0000 (14:08 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 8 Aug 2018 13:08:47 +0000 (14:08 +0100)
src/plugins/lua/clickhouse.lua

index 6eab8696124ce567a481401e5f7f845230057cbb..c2375d7652b657381deed5316b1190ee7c1341c2 100644 (file)
@@ -15,7 +15,6 @@ limitations under the License.
 ]]--
 
 local rspamd_logger = require 'rspamd_logger'
-local rspamd_http = require "rspamd_http"
 local rspamd_lua_utils = require "lua_util"
 local upstream_list = require "rspamd_upstream_list"
 local lua_util = require "lua_util"
@@ -32,7 +31,6 @@ local data_rows = {}
 local custom_rows = {}
 local nrows = 0
 local schema_version = 2 -- Current schema version
-local connect_prefix = 'http://'
 
 local settings = {
   limit = 1000,
@@ -860,8 +858,8 @@ local function check_clickhouse_upstream(upstream, ev_base, cfg)
         check_rspamd_table(upstream, ev_base, cfg)
       end)
   if not ret then
-    rspamd_logger.errx(rspamd_config, "cannot send custom schema %s to clickhouse server %s: cannot make request",
-        k, upstream:get_addr():to_string(true))
+    rspamd_logger.errx(rspamd_config, "cannot get version on clickhouse server %s: cannot make request",
+        upstream:get_addr():to_string(true))
   end
 end
 
@@ -918,9 +916,6 @@ if opts then
     else
       settings['from_map'] = rspamd_map_add('clickhouse', 'from_tables',
         'regexp', 'clickhouse specific domains')
-      if settings.use_https then
-        connect_prefix = 'https://'
-      end
 
       settings.upstream = upstream_list.create(rspamd_config,
         settings['server'] or settings['servers'], 8123)