Health of healthcheck
On my instance (version 1.0.1) I get an error on the healthcheck api api/pleroma/healthcheck
while I have healthcheck: true
in the config. I believe this is an error in the healthcheck itself. The log shows:
[error] Internal server error: %UndefinedFunctionError{arity: 2, function: :fetch, message: nil, module: Pleroma.Healthcheck, reason: "Pleroma.Healthcheck does not implement the Access behaviour"}
After I made the following change to lib/pleroma/web/twitter_api/controllers/util_controller.ex
, it is fixed:
@@ -346,7 +346,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
end
conn =
- if info[:healthy] do
+ if info.healthy do
conn
else
Plug.Conn.put_status(conn, :service_unavailable)
Apparently something to do with info being a struct, see here. This is the opposite change to what merge request !1088 (merged) did, so I'm not sure. Also I can't fully test and I don't know Elixir, so I leave this to the experts.