some changes to get errors to report to Sentry

This commit is contained in:
Renée Hendricksen 2016-05-30 17:16:27 +02:00
parent 0e43360f1d
commit 2ded8ac2be
3 changed files with 4 additions and 4 deletions

View File

@ -102,7 +102,7 @@ module Travis::Api
use(Rack::Config) { |env| env['metriks.request.start'] ||= Time.now.utc } use(Rack::Config) { |env| env['metriks.request.start'] ||= Time.now.utc }
use Travis::Api::App::Cors # if Travis.env == 'development' ??? use Travis::Api::App::Cors # if Travis.env == 'development' ???
use Raven::Rack if Travis.env == 'production' || Travis.env == 'staging' use Raven::Rack if Travis::Api::App.use_monitoring?
use Rack::SSL if Endpoint.production? use Rack::SSL if Endpoint.production?
use ActiveRecord::ConnectionAdapters::ConnectionManagement use ActiveRecord::ConnectionAdapters::ConnectionManagement
use ActiveRecord::QueryCache use ActiveRecord::QueryCache
@ -192,7 +192,7 @@ module Travis::Api
end end
end end
if use_monitoring? and not console? if use_monitoring? && !console
setup_monitoring setup_monitoring
end end
end end

View File

@ -9,7 +9,7 @@ class Travis::Api::App
Thread.new do Thread.new do
loop do loop do
begin begin
Raven.send queue.pop Raven.send :send_event, queue.pop
rescue Exception => e rescue Exception => e
puts e.message, e.backtrace puts e.message, e.backtrace
end end

View File

@ -16,7 +16,7 @@ end
V3 = Travis::API::V3 V3 = Travis::API::V3
Travis::Api::App.setup Travis::Api::App.new
console = Travis::Console.new console = Travis::Console.new
methods = Travis::Console.instance_methods - Object.instance_methods methods = Travis::Console.instance_methods - Object.instance_methods