Exception: DilisensePepClient::CircuitBreaker::CircuitOpenError
- Inherits:
-
StandardError
- Object
- StandardError
- DilisensePepClient::CircuitBreaker::CircuitOpenError
- Defined in:
- lib/dilisense_pep_client/circuit_breaker.rb
Overview
Exception raised when the circuit breaker is in the OPEN state Indicates that requests are being blocked to protect the downstream service
Instance Attribute Summary collapse
-
#next_attempt_time ⇒ Object
readonly
Returns the value of attribute next_attempt_time.
-
#service_name ⇒ Object
readonly
Returns the value of attribute service_name.
Instance Method Summary collapse
-
#initialize(service_name, next_attempt_time) ⇒ CircuitOpenError
constructor
A new instance of CircuitOpenError.
Constructor Details
#initialize(service_name, next_attempt_time) ⇒ CircuitOpenError
Returns a new instance of CircuitOpenError.
49 50 51 52 53 |
# File 'lib/dilisense_pep_client/circuit_breaker.rb', line 49 def initialize(service_name, next_attempt_time) super("Circuit breaker is OPEN for #{service_name}. Next attempt allowed at #{next_attempt_time}") @service_name = service_name @next_attempt_time = next_attempt_time end |
Instance Attribute Details
#next_attempt_time ⇒ Object (readonly)
Returns the value of attribute next_attempt_time.
55 56 57 |
# File 'lib/dilisense_pep_client/circuit_breaker.rb', line 55 def next_attempt_time @next_attempt_time end |
#service_name ⇒ Object (readonly)
Returns the value of attribute service_name.
55 56 57 |
# File 'lib/dilisense_pep_client/circuit_breaker.rb', line 55 def service_name @service_name end |