diff options
author | Nick Sieger <nick@nicksieger.com> | 2008-09-04 14:03:19 +0200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-09-04 14:36:09 +0200 |
commit | 7ba28726150f5d4ee3b3cb676d6b73cc3b62e186 (patch) | |
tree | 31080b916ee83653d58bc0d76397b28d884ae6d0 /activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | |
parent | f54be2cb3105856dc1fb31afc6c9012a91e53823 (diff) | |
download | rails-7ba28726150f5d4ee3b3cb676d6b73cc3b62e186.tar.gz rails-7ba28726150f5d4ee3b3cb676d6b73cc3b62e186.tar.bz2 rails-7ba28726150f5d4ee3b3cb676d6b73cc3b62e186.zip |
Deprecate verification_timeout and verify before reset
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb index 838b0434b0..6b4bc2574d 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -35,7 +35,6 @@ module ActiveRecord # * +wait_timeout+: number of seconds to block and wait for a connection # before giving up and raising a timeout error (default 5 seconds). class ConnectionPool - delegate :verification_timeout, :to => "::ActiveRecord::Base" attr_reader :spec def initialize(spec) @@ -60,7 +59,6 @@ module ActiveRecord # held in a hash keyed by the thread id. def connection if conn = @reserved_connections[current_connection_id] - conn.verify!(verification_timeout) conn else @reserved_connections[current_connection_id] = checkout @@ -118,7 +116,7 @@ module ActiveRecord def verify_active_connections! #:nodoc: clear_stale_cached_connections! @connections.each do |connection| - connection.verify!(verification_timeout) + connection.verify! end end @@ -200,8 +198,8 @@ module ActiveRecord end def checkout_and_verify(c) + c.verify! c.run_callbacks :checkout - c.verify!(verification_timeout) @checked_out << c c end |