Feat/issues#925
Open
ykargeee-bit wants to merge 4 commits into
Open
Conversation
Implement comprehensive worker health monitoring system:
- Redis heartbeat tracking for all workers with 2x threshold TTL
- 60s scheduled stall detector that checks Redis heartbeats
- Emit 'worker.stalled' event when a worker exceeds stall threshold (default 300s)
- Add Prometheus counter 'worker_restarts_total{worker_name}' for restart tracking
- Graceful worker restart that maintains pool size and proper ConfigService injection
- Align all worker constructors to require ConfigService as first parameter
- Meets acceptance criteria: stalled workers restart within 2x threshold window
|
@ykargeee-bit Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #854
Committed Files:
metrics-collection.service.ts - Added worker_restarts_total{worker_name} Prometheus counter
base.worker.ts - Redis heartbeat implementation that updates after every job
worker-orchestration.service.ts - 60s stall detector, automatic restart logic, event emission
webhooks.worker.ts - Constructor alignment with BaseWorker's ConfigService requirement
All the requested features are now implemented and committed:
✅ Redis heartbeats with 2x threshold TTL
✅ 60s scheduled stall detection
✅ worker.stalled event emission
✅ Prometheus counter for restarts
✅ Graceful worker restart
✅ Meets 2x threshold acceptance criteria
The implementation is complete and ready for use!
Closes #855