Sha256: 5d59e5eac3a3e940e766c7d68980dfb56499af0fc9e767088aca658707070b0b

Contents?: true

Size: 375 Bytes

Versions: 6

Compression:

Stored size: 375 Bytes

Contents

module Activerecord::Mysql::Reconnect::ReconnectWithRetry
  def reconnect!
    Activerecord::Mysql::Reconnect.retryable(
      :proc => proc { super },
      :connection => @connection
    )
  end
end

class ActiveRecord::ConnectionAdapters::Mysql2Adapter
  alias_method :reconnect_without_retry!, :reconnect!
  prepend Activerecord::Mysql::Reconnect::ReconnectWithRetry
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
activerecord-mysql-reconnect-new-0.6.0 lib/activerecord/mysql/reconnect/mysql2_adapter_ext.rb
activerecord-mysql-reconnect-before-retry-0.5.0 lib/activerecord/mysql/reconnect/mysql2_adapter_ext.rb
activerecord-mysql-reconnect-0.5.0 lib/activerecord/mysql/reconnect/mysql2_adapter_ext.rb
activerecord-mysql-reconnect-0.4.2 lib/activerecord/mysql/reconnect/mysql2_adapter_ext.rb
activerecord-mysql-reconnect-0.4.1 lib/activerecord/mysql/reconnect/mysql2_adapter_ext.rb
activerecord-mysql-reconnect-0.4.1.beta lib/activerecord/mysql/reconnect/mysql2_adapter_ext.rb