Browse files

Simplify dispatcher callbacks to eliminate unnecessary stale thread p…

…urging. [Nick Sieger, Pratik Naik]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
1 parent d3ec1d3 commit 529c2716992490a6eab55486788ca0d35c17e60b @nicksieger nicksieger committed with lifo Nov 7, 2008
View
1 actionpack/lib/action_controller/dispatcher.rb
@@ -23,7 +23,6 @@ def define_dispatcher_callbacks(cache_classes)
if defined?(ActiveRecord)
after_dispatch :checkin_connections
- before_dispatch { ActiveRecord::Base.verify_active_connections! }
to_prepare(:activerecord_instantiate_observers) { ActiveRecord::Base.instantiate_observers }
end
View
5 activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -292,10 +292,7 @@ def establish_connection(name, spec)
# and also returns connections to the pool cached by threads that are no
# longer alive.
def clear_active_connections!
- @connection_pools.each_value do |pool|
- pool.release_connection
- pool.clear_stale_cached_connections!
- end
+ @connection_pools.each_value {|pool| pool.release_connection }
end
# Clears the cache which maps classes

0 comments on commit 529c271

Please sign in to comment.