reorder routes
This commit is contained in:
parent
20c34f3c76
commit
a30c6d7cb8
16
app.rb
16
app.rb
@ -311,14 +311,6 @@ get "/headers", provides: "json" do
|
|||||||
jsonify h, pretty:
|
jsonify h, pretty:
|
||||||
end
|
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
|
get "/uptime", provides: "json" do
|
||||||
tt = TickTock.new
|
tt = TickTock.new
|
||||||
x = {started_at: tt.started_at, seconds: tt.uptime.to_i, human: human_time(tt.uptime.to_i)}
|
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"
|
"ok\n"
|
||||||
end
|
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
|
get "/readyz" do
|
||||||
error 503 unless Ready.instance.ready?
|
error 503 unless Ready.instance.ready?
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user