Module: Sequel::PoolCleaner
- Defined in:
- lib/sequel/pool_cleaner/version.rb,
lib/sequel/extensions/pool_cleaner.rb
Defined Under Namespace
Classes: Retry
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Attribute Summary collapse
-
#connection_timeout ⇒ Object
The number of seconds that need to pass since connection checking before terminating and rebuilding the connection when checking it out from the pool.
Class Method Summary collapse
Instance Attribute Details
#connection_timeout ⇒ Object
The number of seconds that need to pass since connection checking before terminating and rebuilding the connection when checking it out from the pool. Defaults to 1800 seconds (1 hour).
11 12 13 |
# File 'lib/sequel/extensions/pool_cleaner.rb', line 11 def connection_timeout @connection_timeout end |
Class Method Details
.extended(pool) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/sequel/extensions/pool_cleaner.rb', line 15 def self.extended(pool) pool.instance_eval do @connection_timestamps ||= {} @connection_timeout = 1800 end pool.db.send(:valid_connection_sql) end |