danielfm / pybreaker

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

Monitoring two or more funcions #58

Open leo14993 opened 3 years ago

leo14993 commented 3 years ago

I'm trying use the decorator to monitoring two functions saving the state in redis, but when the first function is ok and the second function is failed, and i make a request again, the first function when is ok reset the counter of fails and the circuit never open

Cruuncher commented 2 years ago

I think you just need to pass a namespace to the CircuitRedisStorage instance.

CircuitRedisStorage(..., namespace='func1') CircuitRedisStorage(..., namespace='func2')