-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should listener.failure be called when the circuit is closed and a call fails? #16
Comments
Good catch. AFAIK this behavior is not intentional, seems more like a bug to me. |
Just pushed a new version, that hopefully fixes this issue, can you take some time to test it? |
Sure, all my tests pass at the moment but it's still fairly early in my development process. |
Actually, it looks like Redis is now a dependency, it wasn't before. If that was intentional, that's fine. Otherwise, my tests are now broken. |
Redis is an optional dependency, in case you enable the Redis backing. You should be able to use it without it though. |
I get |
This is a bug; redis should not be required to use pybreaker. I'll see what I can do. /cc @phillbaker |
Ouch. Sorry about that. I'll take a look tonight. |
@sj175 can you please try 0.3.3 to see if the last PR fixes the issue? Feel free to reopen this in case it didn't. |
That's fixed. Brilliant, thank you! |
When the circuit breaker's state is closed and the call to the wrapped function fails the listener.failure function is not called because an exception is thrown in CircuitClosedState.on_failure. Is this behaviour intentional?
The block below is from the CircuitBreakerState class:
The text was updated successfully, but these errors were encountered: