feat: resilient background job retry & monitoring#707
Open
shaidshark wants to merge 3 commits intorohitdash08:mainfrom
Open
feat: resilient background job retry & monitoring#707shaidshark wants to merge 3 commits intorohitdash08:mainfrom
shaidshark wants to merge 3 commits intorohitdash08:mainfrom
Conversation
Implements weekly financial digests with: - Comprehensive weekly summary (income, expenses, net flow, savings rate) - Week-over-week trends analysis - Spending breakdown by category - Notable transactions highlights - Upcoming bills preview - AI-generated financial insights - Email delivery via existing SMTP infrastructure - Scheduled weekly generation (Sundays 9 AM UTC via APScheduler) New endpoints: - GET /digest/weekly - Get weekly digest data - POST /digest/weekly/send - Send digest email - GET /digest/weekly/preview - Preview email content - GET /scheduler/status - Check scheduler status CLI commands: - flask generate-digest --user-id ID --send-email Fixes rohitdash08#121
- Add retry tracking fields to Reminder model (retry_count, last_retry_at, next_retry_at, failure_reason, status) - Implement dispatch_reminder with exponential backoff (5min base, max 5 retries) - Update /reminders/run to use dispatch_reminder and handle retrying reminders - Add admin monitoring endpoints: /admin/reminders/metrics and /admin/reminders/failures - Extend OpenAPI spec with new fields and admin endpoints - Update README with retry mechanism and admin monitoring documentation - Add observability events for sent, retry, failed - Add comprehensive tests for retry logic and admin access - Ensure schema compatibility for existing PostgreSQL deployments Closes rohitdash08#130
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.
Implements resilient retry handling and basic monitoring for reminder/background job delivery.
Included
This is intentionally scoped to the existing reminder/background processing flow rather than introducing a new queueing system.