Skip to content

Commit

Permalink
rename method from check to record
Browse files Browse the repository at this point in the history
  • Loading branch information
StarpTech committed May 17, 2017
1 parent b468d94 commit 89a4822
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/hemera/lib/circuitBreaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class CircuitBreaker extends EventEmitter {
* @memberof CircuitBreaker
*/
success () {
this.check(true)
this.record(true)
}

/**
Expand All @@ -138,7 +138,7 @@ class CircuitBreaker extends EventEmitter {
* @memberof CircuitBreaker
*/
failure () {
this.check(false)
this.record(false)
}
/**
*
Expand All @@ -148,7 +148,7 @@ class CircuitBreaker extends EventEmitter {
*
* @memberof CircuitBreaker
*/
check (success) {
record (success) {
if (this._state === this.CIRCUIT_HALF_OPEN) {
// The counter used by the Half-Open state records the number of successful attempts to invoke the operation.
// The circuit breaker reverts to the Closed state after a specified number of consecutive operation invocations have been successful.
Expand Down

0 comments on commit 89a4822

Please sign in to comment.