Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/activerecord/mysql/reconnect/base_ext.rb

Constant Summary collapse

RETRY_MODES =
[:r, :rw, :force]
DEFAULT_RETRY_MODE =
:r

Class Method Summary collapse

Class Method Details

.retry_databasesObject



22
23
24
# File 'lib/activerecord/mysql/reconnect/base_ext.rb', line 22

def retry_databases
   Activerecord::Mysql::Reconnect.retry_databases
end

.retry_databases=(v) ⇒ Object



18
19
20
# File 'lib/activerecord/mysql/reconnect/base_ext.rb', line 18

def retry_databases=(v)
   Activerecord::Mysql::Reconnect.retry_databases = v
end

.retry_modeObject



14
15
16
# File 'lib/activerecord/mysql/reconnect/base_ext.rb', line 14

def retry_mode
   Activerecord::Mysql::Reconnect.retry_mode
end

.retry_mode=(v) ⇒ Object



10
11
12
# File 'lib/activerecord/mysql/reconnect/base_ext.rb', line 10

def retry_mode=(v)
   Activerecord::Mysql::Reconnect.retry_mode = v
end

.without_retryObject



26
27
28
29
30
# File 'lib/activerecord/mysql/reconnect/base_ext.rb', line 26

def without_retry
  Activerecord::Mysql::Reconnect.without_retry do
    yield
  end
end