danielfm / pybreaker

Python implementation of the Circuit Breaker pattern.
BSD 3-Clause "New" or "Revised" License
512 stars 74 forks source link

Exception blacklist instead of whitelist? #5

Open n2taylor opened 8 years ago

n2taylor commented 8 years ago

For the use case I'm working on, I would prefer to specify a list of exceptions that WILL count against the breaker's fail_counter, rather than a list of exceptions that shouldn't be counted against it. That would prevent any unexpected run-time error from tripping the breaker. What do you think?

labrys commented 8 years ago

I second this, as I have a several use cases myself that this would be extremely useful (e.g. to disable only certain features based on a limited set of exceptions).