Class: Sunspot::SessionProxy::MasterSlaveWithFailoverSessionProxy
- Inherits:
-
MasterSlaveSessionProxy
- Object
- MasterSlaveSessionProxy
- Sunspot::SessionProxy::MasterSlaveWithFailoverSessionProxy
- Defined in:
- lib/sunspot-rails-failover/master_slave_with_failover_session_proxy.rb
Instance Attribute Summary collapse
-
#exception ⇒ Object
Returns the value of attribute exception.
Instance Method Summary collapse
Instance Attribute Details
#exception ⇒ Object
Returns the value of attribute exception.
5 6 7 |
# File 'lib/sunspot-rails-failover/master_slave_with_failover_session_proxy.rb', line 5 def exception @exception end |
Instance Method Details
#commit ⇒ Object
7 8 9 10 11 |
# File 'lib/sunspot-rails-failover/master_slave_with_failover_session_proxy.rb', line 7 def commit with_exception_handling do master_session.commit end end |
#search(*types, &block) ⇒ Object
13 14 15 16 17 |
# File 'lib/sunspot-rails-failover/master_slave_with_failover_session_proxy.rb', line 13 def search(*types, &block) [slave_session, master_session].any? do |session| with_exception_handling { session.search(*types, &block) } end or raise(exception) end |