sunng87 / diehard

Clojure resilience library for flexible retry, circuit breaker and rate limiter
Eclipse Public License 2.0
330 stars 27 forks source link

Circuit breaker not opening #59

Closed arichiardi closed 1 year ago

arichiardi commented 1 year ago

Hi there, I might not understand how this works. Very likely I am missing something.

I have a :fail-if that always returns true and a block of database code that throws a PSQLException.

Basically the with-circuit-breaker form always always throws and never enters in any of the callback functions, where I have logging statements.

I don't have any threshold set (but I tried with them) and I expected for the circuit to open at the first failure.

What am I doing wrong?

sunng87 commented 1 year ago

Could you please show me a minimal reproducible example for your issue? According to docs of failsafe its default behaviour is open on the first failure.

arichiardi commented 1 year ago

yeah i tried a minimal repro and it works fine there, closing this one until I understand what i going on thanks!