Module Sequel::ConnectionValidator
In: lib/sequel/extensions/connection_validator.rb

Methods

extended  

Classes and Modules

Class Sequel::ConnectionValidator::Retry

Attributes

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).

Public Class methods

Initialize the data structures used by this extension.

[Source]

    # File lib/sequel/extensions/connection_validator.rb, line 62
62:     def self.extended(pool)
63:       pool.instance_exec do
64:         sync do
65:           @connection_timestamps ||= {}
66:           @connection_validation_timeout ||= 3600
67:         end
68:       end
69: 
70:       # Make sure the valid connection SQL query is precached,
71:       # otherwise it's possible it will happen at runtime. While
72:       # it should work correctly at runtime, it's better to avoid
73:       # the possibility of failure altogether.
74:       pool.db.send(:valid_connection_sql)
75:     end

[Validate]