diff --git a/app.rb b/app.rb index 0ffda20..70cd558 100644 --- a/app.rb +++ b/app.rb @@ -226,10 +226,10 @@ get "/headers", provides: "json" do JSON.generate h end -get "/livez" do +get '/livez' do error 503 unless Health.instance.healthy? - return Health.instance.to_json if request.env["HTTP_ACCEPT"] == "application/json" + return Health.instance.to_json if request.env['HTTP_ACCEPT'] == 'application/json' Health.instance.to_s end @@ -250,6 +250,14 @@ post "/livez/sleep" do "ok\n" end +get '/readyz' do + error 503 unless Ready.instance.healthy? + + return Ready.instance.to_json if request.env['HTTP_ACCEPT'] == 'application/json' + + Ready.instance.to_s +end + get "/uuid" do n = params.fetch(:n, 1).to_i stream do |out|