1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Simplify dispatcher callbacks to eliminate unnecessary stale thread purging. [Nick Sieger, Pratik Naik]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
This commit is contained in:
Nick Sieger 2008-11-08 03:49:25 +05:30 committed by Pratik Naik
parent d3ec1d3c22
commit 529c271699
2 changed files with 1 additions and 5 deletions

View file

@ -23,7 +23,6 @@ module ActionController
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 file

@ -292,10 +292,7 @@ module ActiveRecord
# 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