Module: Sunspot::Rails::Failover
- Defined in:
- lib/sunspot/rails/failover.rb,
lib/sunspot/rails/failover/version.rb,
lib/sunspot/rails/failover/exception_handler_adapter.rb
Defined Under Namespace
Modules: ExceptionHandlerAdapter
Constant Summary collapse
- VERSION =
"0.0.5"
Class Attribute Summary collapse
-
.exception_handler ⇒ Object
Returns the value of attribute exception_handler.
Class Method Summary collapse
Class Attribute Details
.exception_handler ⇒ Object
Returns the value of attribute exception_handler.
9 10 11 |
# File 'lib/sunspot/rails/failover.rb', line 9 def exception_handler @exception_handler end |
Class Method Details
.setup ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/sunspot/rails/failover.rb', line 11 def setup Sunspot.session = if Rails.configuration.has_master? SessionProxy::MasterSlaveWithFailoverSessionProxy.new( SessionProxy::ThreadLocalSessionProxy.new(master_config), SessionProxy::ThreadLocalSessionProxy.new(slave_config) ) else SessionProxy::ThreadLocalSessionProxy.new(slave_config) end end |