Remove response inspector. Enable monitoring on staging.
This commit is contained in:
parent
ca0f1c4784
commit
74761b439e
|
@ -27,20 +27,6 @@ require 'travis/api/v2/http'
|
||||||
# run Travis::Api::App.new
|
# run Travis::Api::App.new
|
||||||
#
|
#
|
||||||
# Requires TLS in production.
|
# Requires TLS in production.
|
||||||
class ResponseInspect
|
|
||||||
def initialize(app)
|
|
||||||
@app = app
|
|
||||||
end
|
|
||||||
|
|
||||||
def call(env)
|
|
||||||
status, headers, response = @app.call(env)
|
|
||||||
if response.nil?
|
|
||||||
puts "Error: nil response"
|
|
||||||
end
|
|
||||||
[status, headers, response]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module Travis::Api
|
module Travis::Api
|
||||||
class App
|
class App
|
||||||
autoload :AccessToken, 'travis/api/app/access_token'
|
autoload :AccessToken, 'travis/api/app/access_token'
|
||||||
|
@ -108,7 +94,6 @@ module Travis::Api
|
||||||
use ActiveRecord::ConnectionAdapters::ConnectionManagement
|
use ActiveRecord::ConnectionAdapters::ConnectionManagement
|
||||||
use ActiveRecord::QueryCache
|
use ActiveRecord::QueryCache
|
||||||
|
|
||||||
use ResponseInspect
|
|
||||||
memcache_servers = ENV['MEMCACHIER_SERVERS']
|
memcache_servers = ENV['MEMCACHIER_SERVERS']
|
||||||
if Travis::Features.feature_active?(:use_rack_cache) && memcache_servers
|
if Travis::Features.feature_active?(:use_rack_cache) && memcache_servers
|
||||||
use Rack::Cache,
|
use Rack::Cache,
|
||||||
|
@ -172,7 +157,7 @@ module Travis::Api
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if Travis.env == 'production' and not console?
|
if (Travis.env == 'production' || Travis.env == 'staging') and not console?
|
||||||
setup_monitoring
|
setup_monitoring
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user