Skip to content

Commit

Permalink
mix format
Browse files Browse the repository at this point in the history
  • Loading branch information
thbar committed Dec 24, 2024
1 parent 9899dfd commit d03bb83
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions apps/transport/lib/transport_web/plugs/worker_healthcheck.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@ defmodule TransportWeb.Plugs.WorkerHealthcheck do
store_last_attempted_at_delay_metric()
status_code = if healthy_state?(), do: 200, else: 503

conn = conn
|> put_resp_content_type("text/plain")
|> send_resp(status_code, """
UP (WORKER-ONLY)
App start time: #{app_start_datetime()}
App started recently?: #{app_started_recently?()}
Oban last attempt: #{oban_last_attempted_at()}
Oban attempted jobs recently?: #{oban_attempted_jobs_recently?()}
Healthy state?: #{healthy_state?()}
""")
|> halt()
conn =
conn
|> put_resp_content_type("text/plain")
|> send_resp(status_code, """
UP (WORKER-ONLY)
App start time: #{app_start_datetime()}
App started recently?: #{app_started_recently?()}
Oban last attempt: #{oban_last_attempted_at()}
Oban attempted jobs recently?: #{oban_attempted_jobs_recently?()}
Healthy state?: #{healthy_state?()}
""")
|> halt()

# NOTE: Clever Cloud monitoring will better pick stuff back up
# if the app is completely down.
Expand Down

0 comments on commit d03bb83

Please sign in to comment.