Add readiness check web endpoint
This commit is contained in:
parent
f131f64641
commit
fcd11b751d
8
app.rb
8
app.rb
@ -250,6 +250,14 @@ post "/livez/sleep" do
|
|||||||
"ok\n"
|
"ok\n"
|
||||||
end
|
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
|
get "/uuid" do
|
||||||
n = params.fetch(:n, 1).to_i
|
n = params.fetch(:n, 1).to_i
|
||||||
stream do |out|
|
stream do |out|
|
||||||
|
Loading…
Reference in New Issue
Block a user