refactor(utils): remove circuit-breaker integration from helpers
- Utils/index.ts: re-export bounded-retry instead of circuit-breaker - Utils/unified-session.ts: drop the optional circuit-breaker wrapping. Telemetry is non-critical; a single send attempt with the underlying sendNode timeout is sufficient. Removed enableCircuitBreaker option, circuitBreaker field, and CircuitOpenError handling. - Utils/retry-utils.ts: drop the optional circuitBreaker option from withRetry. Retry mechanics are now self-contained; callers that need bounded retries should prefer withBoundedRetry directly. - Utils/health-status.ts: stop importing globalCircuitRegistry. Keep the CircuitBreakerHealth shape for k8s probe schema stability — always reports an empty list now. Note: src/Utils/structured-logger.ts has its own *private* CircuitBreaker class for log-throttling — independent of the socket-level circuit breaker being removed. Untouched. baileys-logger.ts logCircuitBreaker() is a generic logging helper that takes state strings as input — no import dependency. Untouched (no-op for callers that no longer have circuit breakers).
This commit is contained in:
+1
-1
@@ -33,8 +33,8 @@ export * from './trace-context'
|
||||
export * from './prometheus-metrics'
|
||||
|
||||
// Resilience and performance
|
||||
export * from './bounded-retry'
|
||||
export * from './cache-utils'
|
||||
export * from './circuit-breaker'
|
||||
export * from './retry-utils'
|
||||
|
||||
// Telemetry and detection mitigation
|
||||
|
||||
Reference in New Issue
Block a user