Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
docs(createCircuitBreaker): update healthcheck interval description
Browse files Browse the repository at this point in the history
Co-authored-by: Jonny Adshead <[email protected]>
  • Loading branch information
10xLaCroixDrinker and JAdshead authored Dec 16, 2020
1 parent a23c430 commit 93ff7f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/utils/createCircuitBreaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const createCircuitBreaker = (asyncFunctionThatMightFail) => {
const breaker = new CircuitBreaker(asyncFunctionThatMightFail, options);
// Fallback returns true to indicate fallback behavior is needed
breaker.fallback(() => true);
// Check the max event loop delay every 500ms
// Check the max event loop delay every 5 seconds
breaker.healthCheck(checkMaxEventLoopDelay, 5e3);
// Log when circuit breaker opens and closes
breaker.on('open', () => console.log(`Circuit breaker [${asyncFunctionThatMightFail.name}] opened`));
Expand Down

0 comments on commit 93ff7f8

Please sign in to comment.