diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-05-30 15:33:58 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-05-30 15:33:58 +0700 |
commit | 99f70c7e2011ab29746a8a61d3a4b354f4513045 (patch) | |
tree | d79bbc38ad1987d7c11426538c0b3dbefe661311 /lib/healthcheck.ex | |
parent | 57e58d26029388a5831cd2ac3fbc419c27c4d7c6 (diff) | |
download | pleroma-99f70c7e2011ab29746a8a61d3a4b354f4513045.tar.gz pleroma-99f70c7e2011ab29746a8a61d3a4b354f4513045.zip |
Use Pleroma.Config everywhere
Diffstat (limited to 'lib/healthcheck.ex')
-rw-r--r-- | lib/healthcheck.ex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/healthcheck.ex b/lib/healthcheck.ex index 646fb3b9d..32aafc210 100644 --- a/lib/healthcheck.ex +++ b/lib/healthcheck.ex @@ -29,13 +29,13 @@ defmodule Pleroma.Healthcheck do end defp assign_db_info(healthcheck) do - database = Application.get_env(:pleroma, Repo)[:database] + database = Pleroma.Config.get([Repo, :database]) query = "select state, count(pid) from pg_stat_activity where datname = '#{database}' group by state;" result = Repo.query!(query) - pool_size = Application.get_env(:pleroma, Repo)[:pool_size] + pool_size = Pleroma.Config.get([Repo, :pool_size]) db_info = Enum.reduce(result.rows, %{active: 0, idle: 0}, fn [state, cnt], states -> |