Feature request: resetTimeout and half-open state without a timer. #719
Closed
Description
opened on Jan 13, 2023
Howdy!
I'm trying to introduce the circuit-breaker pattern in our graphql resolvers, with Apollo Server.
One problem I'm having is that while I can store and load the state, the circuit-breaker object is created per-request, and each request is short lived - so the timer that would normally toggle the HALF_OPEN state to on doesn't get a chance to.
It would be awesome if opossum
stored the last time it was used, and would toggle the HALF_OPEN state if more than resetTimeout
had passed since the last time; otherwise, I'll have to write my own way to measure the passage of time and manually toggle the half-open state.
Activity