feat: resilient background job retry & monitoring#657
Open
chengyixu wants to merge 1 commit intorohitdash08:mainfrom
Open
feat: resilient background job retry & monitoring#657chengyixu wants to merge 1 commit intorohitdash08:mainfrom
chengyixu wants to merge 1 commit intorohitdash08:mainfrom
Conversation
Implements a production-ready background job execution framework with: - JobExecution model for tracking job state, retries, and errors - Exponential backoff with jitter (5min/15min/45min retry intervals) - Circuit breaker pattern for external services (email, WhatsApp) - Dead-letter handling for jobs that exhaust all retries - Manual retry capability for failed/dead jobs - REST API endpoints for job monitoring: - GET /jobs/status — paginated job list with filters - GET /jobs/stats — aggregate statistics and success rates - GET /jobs/health — circuit breaker and system health - POST /jobs/retry/<id> — manual retry of failed jobs - POST /jobs/process-retries — process pending retries - Integration with existing reminder dispatch pipeline - 30 comprehensive tests covering all functionality /claim rohitdash08#130 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Implements a production-ready background job execution framework for FinMind that adds resilience to reminder dispatch and other background tasks.
/claim #130
Features
Job Execution Engine:
JobExecutionmodel tracking every background job with full lifecycle metadata (status, retries, errors, timestamps)Exponential Backoff with Jitter:
Circuit Breaker Pattern:
Dead-Letter Handling:
REST API Endpoints:
Integration:
Test Coverage
30 tests covering:
All 30 tests pass.
Files Changed
Database Migration
No Breaking Changes