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).
34 35 36 |
# File 'lib/sequel/extensions/connection_expiration.rb', line 34 def connection_expiration_timeout @connection_expiration_timeout end |
Class Method Details
.extended(pool) ⇒ Object
Initialize the data structures used by this extension.
37 38 39 40 41 42 43 44 |
# File 'lib/sequel/extensions/connection_expiration.rb', line 37 def self.extended(pool) pool.instance_eval do sync do @connection_expiration_timestamps ||= {} @connection_expiration_timeout ||= 14400 end end end |