Exception: Tenax::CircuitOpenError
- Inherits:
-
ExecutionError
- Object
- StandardError
- Error
- ExecutionError
- Tenax::CircuitOpenError
- Defined in:
- lib/tenax/errors.rb
Overview
Raised when a circuit breaker is open and rejects the operation without attempting it.
Instance Attribute Summary collapse
-
#opened_at ⇒ Object
readonly
Returns the value of attribute opened_at.
Attributes inherited from ExecutionError
Instance Method Summary collapse
-
#initialize(profile_name:, opened_at:) ⇒ CircuitOpenError
constructor
A new instance of CircuitOpenError.
Constructor Details
#initialize(profile_name:, opened_at:) ⇒ CircuitOpenError
Returns a new instance of CircuitOpenError.
91 92 93 94 95 96 97 98 |
# File 'lib/tenax/errors.rb', line 91 def initialize(profile_name:, opened_at:) @opened_at = opened_at super( "circuit breaker for profile #{profile_name.inspect} is open (opened at #{opened_at})", profile_name: profile_name, attempts: 0 ) end |
Instance Attribute Details
#opened_at ⇒ Object (readonly)
Returns the value of attribute opened_at.
89 90 91 |
# File 'lib/tenax/errors.rb', line 89 def opened_at @opened_at end |