| 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 57
57: def self.extended(pool)
58: pool.instance_eval do
59: @connection_timestamps ||= {}
60: @connection_validation_timeout = 3600
61: end
62:
63: # Make sure the valid connection SQL query is precached,
64: # otherwise it's possible it will happen at runtime. While
65: # it should work correctly at runtime, it's better to avoid
66: # the possibility of failure altogether.
67: pool.db.send(:valid_connection_sql)
68: end