travis-api/lib/travis/api/app/endpoint/uptime.rb
2013-11-07 15:53:59 +01:00

17 lines
339 B
Ruby

require 'travis/api/app'
class Travis::Api::App
class Endpoint
class Uptime < Endpoint
get '/', scope: :hidden do
begin
ActiveRecord::Base.connection.execute('select 1')
[200, "OK"]
rescue Exception => e
return [500, "Error: #{e.message}"]
end
end
end
end
end