Module | Sequel::ConnectionValidator |
In: |
lib/sequel/extensions/connection_validator.rb
|
connection_validation_timeout | [RW] | The number of seconds that need to pass since connection checkin before attempting to validate the connection when checking it out from the pool. Defaults to 3600 seconds (1 hour). |
Initialize the data structures used by this extension.
# File lib/sequel/extensions/connection_validator.rb, line 58 58: def self.extended(pool) 59: pool.instance_eval do 60: @connection_timestamps ||= {} 61: @connection_validation_timeout = 3600 62: end 63: 64: # Make sure the valid connection SQL query is precached, 65: # otherwise it's possible it will happen at runtime. While 66: # it should work correctly at runtime, it's better to avoid 67: # the possibility of failure altogether. 68: pool.db.send(:valid_connection_sql) 69: end