From a30c6d7cb89fb8aa69004e3625ed58039d3906db Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Wed, 2 Apr 2025 21:01:45 -0500 Subject: [PATCH] reorder routes --- app.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app.rb b/app.rb index 098a720..2b999e4 100644 --- a/app.rb +++ b/app.rb @@ -311,14 +311,6 @@ get "/headers", provides: "json" do jsonify h, pretty: end -get "/livez" do - error 503 unless Health.instance.healthy? - - return Health.instance.to_json if request.env["HTTP_ACCEPT"] == "application/json" - - Health.instance.to_s -end - get "/uptime", provides: "json" do tt = TickTock.new x = {started_at: tt.started_at, seconds: tt.uptime.to_i, human: human_time(tt.uptime.to_i)} @@ -336,6 +328,14 @@ post "/api/livez/sleep" do "ok\n" end +get "/livez" do + error 503 unless Health.instance.healthy? + + return Health.instance.to_json if request.env["HTTP_ACCEPT"] == "application/json" + + Health.instance.to_s +end + get "/readyz" do error 503 unless Ready.instance.ready?