Method: Sequel::ConnectionExpiration.extended
- Defined in:
- lib/sequel/extensions/connection_expiration.rb
permalink .extended(pool) ⇒ Object
Initialize the data structures used by this extension.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/sequel/extensions/connection_expiration.rb', line 47 def self.extended(pool) case pool.pool_type when :single, :sharded_single raise Error, "cannot load connection_expiration extension if using single or sharded_single connection pool" end pool.instance_exec do sync do @connection_expiration_timestamps ||= {} @connection_expiration_timeout ||= 14400 @connection_expiration_random_delay ||= 0 end end end |