From d03bb834d2746db4b0959e6d8eb81f9325cbf527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20Barr=C3=A8re?= Date: Tue, 24 Dec 2024 14:20:18 +0100 Subject: [PATCH] mix format --- .../transport_web/plugs/worker_healthcheck.ex | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/transport/lib/transport_web/plugs/worker_healthcheck.ex b/apps/transport/lib/transport_web/plugs/worker_healthcheck.ex index 90e6e30c9c..3066e88e5f 100644 --- a/apps/transport/lib/transport_web/plugs/worker_healthcheck.ex +++ b/apps/transport/lib/transport_web/plugs/worker_healthcheck.ex @@ -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.