Sha256: 4de1c5d8cea11aaf7e87e2e8e8be107dc2cfc3e540569e9baf83f7308a306351

Contents?: true

Size: 527 Bytes

Versions: 3

Compression:

Stored size: 527 Bytes

Contents

module Activerecord::Mysql::Reconnect::NewConnectionWithRetry
  def new_connection
    if defined?(db_config)
      Activerecord::Mysql::Reconnect.retryable(
        :proc => proc { super },
        :connection => db_config.configuration_hash
      )
    else
      Activerecord::Mysql::Reconnect.retryable(
        :proc => proc { super },
        :connection => spec.config,
      )
    end
  end
end
class ActiveRecord::ConnectionAdapters::ConnectionPool
  prepend Activerecord::Mysql::Reconnect::NewConnectionWithRetry
end

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
activerecord-mysql-reconnect-new-0.6.0 lib/activerecord/mysql/reconnect/connection_pool_ext.rb
activerecord-mysql-reconnect-before-retry-0.5.0 lib/activerecord/mysql/reconnect/connection_pool_ext.rb
activerecord-mysql-reconnect-0.5.0 lib/activerecord/mysql/reconnect/connection_pool_ext.rb