From 91dd199fe2e29397842f819faffc75c9aed4b07e Mon Sep 17 00:00:00 2001 From: Uku Taht Date: Mon, 8 Jun 2020 10:40:11 +0300 Subject: [PATCH] Use clickhouse config when connecting to it --- lib/plausible_release.ex | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/plausible_release.ex b/lib/plausible_release.ex index 59fef555a..1d08a1f19 100644 --- a/lib/plausible_release.ex +++ b/lib/plausible_release.ex @@ -210,12 +210,10 @@ defmodule Plausible.Release do Application.ensure_all_started(:db_connection) Application.ensure_all_started(:hackney) + clickhouse_config = Application.get_env(:plausible, :clickhouse) + Clickhousex.start_link( - scheme: :http, - port: 8123, - name: :clickhouse, - database: "default", - hostname: Keyword.get(Application.get_env(:plausible, :clickhouse), :hostname) + Keyword.merge([scheme: :http, port: 8123, name: :clickhouse], clickhouse_config) ) end