nodeshift / opossum

Node.js circuit breaker - fails fast ⚡️
https://nodeshift.dev/opossum/
Apache License 2.0
1.33k stars 107 forks source link

feat: renewing the AbortController when the circuit enters the 'halfClose' or 'close' state #892

Closed WillianAgostini closed 1 month ago

WillianAgostini commented 1 month ago

Introducing a new option to the CircuitBreaker: autoRenewAbortController. When enabled, this flag automatically recreates the AbortController whenever the CircuitBreaker state transitions to 'halfOpen' or 'closed'. This ensures the controller is reset and ready for reuse in subsequent state changes.

Closes #861

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 11553426220

Details


Files with Coverage Reduction New Missed Lines %
lib/circuit.js 1 98.49%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 11481851974: 0.06%
Covered Lines: 402
Relevant Lines: 403

💛 - Coveralls
WillianAgostini commented 1 month ago

Could you also update the README in the abort controller section mentioning this new feature?

I've added a new commit that updates the README in the abort controller section