Module: Rubypress::XMLRPCRetryable
- Includes:
- Retryable
- Defined in:
- lib/rubypress/xml_rpc_retryable.rb
Constant Summary collapse
- RETRY_EXCEPTIONS =
[ Timeout::Error, Net::ReadTimeout ]
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(instance) ⇒ Object
10 11 12 13 |
# File 'lib/rubypress/xml_rpc_retryable.rb', line 10 def self.extended(instance) instance.singleton_class.send(:alias_method, :call_without_retry, :call) instance.singleton_class.send(:alias_method, :call, :call_with_retry) end |
Instance Method Details
#call_with_retry(method, *args) ⇒ Object
15 16 17 18 19 |
# File 'lib/rubypress/xml_rpc_retryable.rb', line 15 def call_with_retry(method, *args) retryable on: RETRY_EXCEPTIONS do call_without_retry(method, *args) end end |