Labels: enhancement, reliability
Problem
src/lib/db/circuitBreaker.js exists and is used for database calls and the revenue sync (revenueScheduler.js calls shouldAllowRequest() / recordSuccess() / recordFailure(), including auto-failover to a backup DB instance on sustained failure). But gamingService.js, cryptoService.js, wordpressService.js, and nodeService.js never call into it for their calls to the Flux stats API (stats.runonflux.io). A sustained outage on that API just causes repeated retries (where retry logic exists) or immediate throws (where it doesn't), with no backoff and no way to signal degraded state the way DB outages do via getCircuitState().
Solution
Lower priority than Issues 1–4, but worth doing as part of the Issue 3 refactor since those files are already being touched: have the shared resilientFetch() helper call shouldAllowRequest() before attempting a fetch, and recordSuccess()/recordFailure() around it, mirroring the pattern already in revenueScheduler.js.
Files: src/lib/services/gamingService.js, cryptoService.js, wordpressService.js, nodeService.js, src/lib/db/circuitBreaker.js
Labels:
enhancement,reliabilityProblem
src/lib/db/circuitBreaker.jsexists and is used for database calls and the revenue sync (revenueScheduler.jscallsshouldAllowRequest()/recordSuccess()/recordFailure(), including auto-failover to a backup DB instance on sustained failure). ButgamingService.js,cryptoService.js,wordpressService.js, andnodeService.jsnever call into it for their calls to the Flux stats API (stats.runonflux.io). A sustained outage on that API just causes repeated retries (where retry logic exists) or immediate throws (where it doesn't), with no backoff and no way to signal degraded state the way DB outages do viagetCircuitState().Solution
Lower priority than Issues 1–4, but worth doing as part of the Issue 3 refactor since those files are already being touched: have the shared
resilientFetch()helper callshouldAllowRequest()before attempting a fetch, andrecordSuccess()/recordFailure()around it, mirroring the pattern already inrevenueScheduler.js.Files:
src/lib/services/gamingService.js,cryptoService.js,wordpressService.js,nodeService.js,src/lib/db/circuitBreaker.js