reorder routes

This commit is contained in:
Ryan Cavicchioni 2025-04-02 21:01:45 -05:00
parent 20c34f3c76
commit a30c6d7cb8
Signed by: ryanc
SSH Key Fingerprint: SHA256:KbXiwUnZnHFwFtt3Bytd+F3FN9pPHn1Z1cxMIE1TPbg

16
app.rb
View File

@ -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?