travis-api/lib/travis/api/app/endpoint/uptime.rb
2013-08-26 17:29:10 +02:00

17 lines
323 B
Ruby

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