diff options
author | Alex S <alex.strizhakov@gmail.com> | 2019-04-22 17:00:06 +0700 |
---|---|---|
committer | Alex S <alex.strizhakov@gmail.com> | 2019-04-22 17:00:06 +0700 |
commit | d35246c4490bcca4831b85d23049c04ffff58758 (patch) | |
tree | c91d3122dc42ea58582fe4d6cd5d7fb5736b22ff /lib/pleroma/web/twitter_api/controllers/util_controller.ex | |
parent | 20deff75f153ffbd5076e992c7ed3c19ac551535 (diff) | |
download | pleroma-d35246c4490bcca4831b85d23049c04ffff58758.tar.gz |
added healthcheck setting to instance config
Diffstat (limited to 'lib/pleroma/web/twitter_api/controllers/util_controller.ex')
-rw-r--r-- | lib/pleroma/web/twitter_api/controllers/util_controller.ex | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex index d0bf3a315..1122e6c5d 100644 --- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex @@ -365,10 +365,15 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do end def healthcheck(conn, _params) do - info = Pleroma.Healthcheck.system_info() + info = + if Pleroma.Config.get([:instance, :healthcheck]) do + Pleroma.Healthcheck.system_info() + else + %{} + end conn = - if info.healthy do + if info[:healthy] do conn else Plug.Conn.put_status(conn, :service_unavailable) |