From e2b49a91d632e79f07e1036728e253190eab041b Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Thu, 1 Nov 2012 13:03:08 +0100 Subject: [PATCH] Use AR's ConnectionManagement before AR::QueryCache (closes #14) --- lib/travis/api/app.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/travis/api/app.rb b/lib/travis/api/app.rb index 915e212c..ddfe2fc9 100644 --- a/lib/travis/api/app.rb +++ b/lib/travis/api/app.rb @@ -55,6 +55,7 @@ module Travis::Api use Hubble::Rescuer, env: Travis.env, codename: ENV['CODENAME'] if Endpoint.production? && ENV['HUBBLE_ENDPOINT'] use Rack::Protection::PathTraversal use Rack::SSL if Endpoint.production? + use ActiveRecord::ConnectionAdapters::ConnectionManagement use ActiveRecord::QueryCache if memcache_servers = ENV['MEMCACHE_SERVERS'] @@ -67,7 +68,6 @@ module Travis::Api use Rack::Deflater use Rack::PostBodyContentTypeParser use Rack::JSONP - use ActiveRecord::ConnectionAdapters::ConnectionManagement use Rack::Config do |env| env['travis.global_prefix'] = env['SCRIPT_NAME']