1 Commits

Author SHA1 Message Date
2a9e34d345 feat: implement robust retry mechanism for API aggregation service
All checks were successful
Gitea Actions Demo / build (push) Successful in 4m54s
- Add unified retry strategy with exponential backoff and jitter
- Implement health monitoring system for service status tracking
- Enhance WebSocket connection with timeout and heartbeat detection
- Improve WAN polling with connection timeout and error handling
- Add comprehensive test suite for retry mechanisms
- Fix connection hanging issues that prevented proper retry recovery

Key improvements:
- RetryConfig with fast/slow/infinite retry strategies
- HealthMonitor for real-time service status tracking
- Connection timeouts to prevent hanging
- Automatic ping/pong handling for WebSocket
- Consecutive error counting and thresholds
- Detailed logging for better diagnostics

All tests passing: 11 tests (3 unit + 5 integration + 3 lib tests)
2025-06-30 16:49:34 +08:00