Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- 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
- .retry_databases ⇒ Object
- .retry_databases=(v) ⇒ Object
- .retry_mode ⇒ Object
- .retry_mode=(v) ⇒ Object
- .without_retry ⇒ Object
Class Method Details
.retry_databases ⇒ Object
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_mode ⇒ Object
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_retry ⇒ Object
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 |