-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Background
PR #714 introduced a centralized JobScheduler class in server/src/addie/jobs/scheduler.ts to manage scheduled background jobs. Currently it handles:
- Document indexer (hourly)
- Summary generator (daily)
Remaining Jobs to Migrate
The following jobs are still defined inline in server/src/http.ts and should be migrated to the scheduler:
- Content curator - Curates and processes content
- Feed fetcher - Fetches RSS/Atom feeds
- Alert processor - Processes scheduled alerts
- Task reminder - Sends task reminders
- Engagement scoring - Updates engagement scores
- Goal follow-up - Follows up on goals
Benefits of Migration
- Centralized job management in one place
- Easier to add new jobs following established pattern
- Consistent logging with
job-schedulermodule tag - Cleaner
http.tsfile - Foundation for future job management features (pause/resume, admin visibility)
Implementation Notes
Each job should follow the existing pattern:
- Initial delay on startup (staggered to avoid thundering herd)
- Periodic interval
- Proper error handling with logging
- Start/stop methods on the scheduler class
Acceptance Criteria
- All scheduled jobs moved to
scheduler.ts - Jobs removed from
http.ts - Existing tests pass
- Job timing/intervals unchanged
Metadata
Metadata
Assignees
Labels
No labels