-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: prefer an error percentage threshold
Until now, the circuit breaker could only be configured to trip after a fixed number of failures. This is problematic, because those failures may accumulate over a long period of time, causing the circuit to open once the threshold has been hit - even if the failure percentage is very, very low. Now when using `options.maxFailures` a deprecation warning is printed to the error console. The new option is `errorThresholdPercentage`. Fixes: #37
- Loading branch information
Showing
2 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
245d47b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So no backward compatibility for max failures. We still need to use it for testing purposes
245d47b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@john681611
maxFailures
is still supported, but currently deprecated. If you are experiencing a problem with it, please let us know with an issue.