Simple implementation of the Circuit Breaker pattern