Skip to content

Commit

Permalink
Make sure to return a conn (avoid RuntimeError)
Browse files Browse the repository at this point in the history
  • Loading branch information
thbar committed Dec 24, 2024
1 parent 07a53b8 commit 9899dfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/transport/lib/transport_web/plugs/worker_healthcheck.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule TransportWeb.Plugs.WorkerHealthcheck do
store_last_attempted_at_delay_metric()
status_code = if healthy_state?(), do: 200, else: 503

conn
conn = conn
|> put_resp_content_type("text/plain")
|> send_resp(status_code, """
UP (WORKER-ONLY)
Expand All @@ -45,6 +45,8 @@ defmodule TransportWeb.Plugs.WorkerHealthcheck do
# "Asynchronously and carefully stops the Erlang runtime system."
System.stop()
end

conn
else
conn
end
Expand Down

0 comments on commit 9899dfd

Please sign in to comment.