Class: Sunspot::SessionProxy::Retry5xxSessionProxy

Inherits:
AbstractSessionProxy show all
Defined in:
lib/sunspot/session_proxy/retry_5xx_session_proxy.rb

Defined Under Namespace

Classes: RetryHandler

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractSessionProxy

delegate, not_supported

Constructor Details

#initialize(search_session = Sunspot.session) ⇒ Retry5xxSessionProxy

Returns a new instance of Retry5xxSessionProxy.



51
52
53
54
# File 'lib/sunspot/session_proxy/retry_5xx_session_proxy.rb', line 51

def initialize(search_session = Sunspot.session)
  @search_session = search_session
  @retry_handler = RetryHandler.new(search_session)
end

Instance Attribute Details

#retry_handlerObject (readonly)

Returns the value of attribute retry_handler.



44
45
46
# File 'lib/sunspot/session_proxy/retry_5xx_session_proxy.rb', line 44

def retry_handler
  @retry_handler
end

#search_sessionObject (readonly)

Returns the value of attribute search_session.



43
44
45
# File 'lib/sunspot/session_proxy/retry_5xx_session_proxy.rb', line 43

def search_session
  @search_session
end

Instance Method Details

#rescued_exception(method, e) ⇒ Object



56
57
58
# File 'lib/sunspot/session_proxy/retry_5xx_session_proxy.rb', line 56

def rescued_exception(method, e)
  $stderr.puts("Exception in #{method}: #{e.message}")
end