Class: Thrifter::Retry::Proxy
- Inherits:
- BasicObject
- Defined in:
- lib/thrifter/extensions/retriable.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
-
#retriable ⇒ Object
readonly
Returns the value of attribute retriable.
-
#tries ⇒ Object
readonly
Returns the value of attribute tries.
Instance Method Summary collapse
-
#initialize(client, tries, interval, retriable) ⇒ Proxy
constructor
A new instance of Proxy.
Constructor Details
#initialize(client, tries, interval, retriable) ⇒ Proxy
Returns a new instance of Proxy.
23 24 25 26 27 28 |
# File 'lib/thrifter/extensions/retriable.rb', line 23 def initialize(client, tries, interval, retriable) @client = client @tries = tries @interval = interval @retriable = DEFAULT_RETRIABLE_ERRORS + Array(retriable) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object (private)
32 33 34 |
# File 'lib/thrifter/extensions/retriable.rb', line 32 def method_missing(name, *args) invoke_with_retry(name, *args) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
21 22 23 |
# File 'lib/thrifter/extensions/retriable.rb', line 21 def client @client end |
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
21 22 23 |
# File 'lib/thrifter/extensions/retriable.rb', line 21 def interval @interval end |
#retriable ⇒ Object (readonly)
Returns the value of attribute retriable.
21 22 23 |
# File 'lib/thrifter/extensions/retriable.rb', line 21 def retriable @retriable end |
#tries ⇒ Object (readonly)
Returns the value of attribute tries.
21 22 23 |
# File 'lib/thrifter/extensions/retriable.rb', line 21 def tries @tries end |