feat: Resilient background job retry and monitoring (#130)#680
Open
zacharylyonstx wants to merge 1 commit intorohitdash08:mainfrom
Open
feat: Resilient background job retry and monitoring (#130)#680zacharylyonstx wants to merge 1 commit intorohitdash08:mainfrom
zacharylyonstx wants to merge 1 commit intorohitdash08:mainfrom
Conversation
- Add JobExecution model with status tracking (PENDING/RUNNING/SUCCESS/FAILED/RETRYING/DEAD) - Implement exponential backoff retry engine with jitter and configurable caps - Add resilient_job decorator for APScheduler integration - Redis-backed real-time status cache for fast API polling - Pluggable alert system (log, email, webhook callbacks) - REST API: GET /jobs/, GET /jobs/stats, GET /jobs/<id>, POST /jobs/retry/<id> - React dashboard with status badges, stat cards, filtering, auto-refresh - PostgreSQL schema migration with proper indexes - Comprehensive test suite: retry logic, backoff math, API endpoints, alerts
Author
|
Hey @rohitdash08 — just checking in. Job Retry feature is ready for review with full backend + frontend + tests. Let me know if you'd like any changes! 🙏 |
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 bounty #130 — Resilient background job retry & monitoring system.
Backend
execute_with_retry()wraps any callable with configurable max retries, exponential backoff (base × 2^attempt) with ±25% jitter, and a 10-minute ceiling@resilient_jobdecorator — Drop-in for APScheduler jobs: just decorate and get full retry + tracking for freeregister_alert_callback()GET /jobs/(list + filter),GET /jobs/stats(aggregate counts),GET /jobs/<id>(detail),POST /jobs/retry/<id>(manual retry of DEAD jobs)job_executionstable with proper indexes on job_id, status, and created_atFrontend
Tests (14 files, 1287 lines)
Tech
Flask + SQLAlchemy + Redis + APScheduler (all already in requirements.txt)
Closes #130