Module: Sequel::ConnectionExpiration
- Defined in:
- lib/sequel/extensions/connection_expiration.rb
Defined Under Namespace
Classes: Retry
Instance Attribute Summary collapse
-
#connection_expiration_timeout ⇒ Object
The number of seconds that need to pass since connection creation before expiring a connection.
Class Method Summary collapse
-
.extended(pool) ⇒ Object
Initialize the data structures used by this extension.
Instance Attribute Details
#connection_expiration_timeout ⇒ Object
The number of seconds that need to pass since connection creation before expiring a connection. Defaults to 14400 seconds (4 hours).
39 40 41 |
# File 'lib/sequel/extensions/connection_expiration.rb', line 39 def connection_expiration_timeout @connection_expiration_timeout end |
Class Method Details
.extended(pool) ⇒ Object
Initialize the data structures used by this extension.
42 43 44 45 46 47 48 49 |
# File 'lib/sequel/extensions/connection_expiration.rb', line 42 def self.extended(pool) pool.instance_eval do sync do @connection_expiration_timestamps ||= {} @connection_expiration_timeout ||= 14400 end end end |