-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Feature Request
Description
Track dispatched (key, fire_time) pairs and recover missed runs after downtime.
Use Case
If the scheduler was down, it should enqueue the missed ticks within the lookback window to keep data/jobs current.
Proposed Solution
- Implement
RailsCrons::DispatchLogthat records successful dispatch decisions per (key, fire_time). - Backends:
- Redis: ephemeral keys with TTL.
- Postgres: table with
(key, fire_time)unique index. - File: filesystem-safe hash files.
- During each tick, compute expected fire times in the recovery window; enqueue those not found in the dispatch log (subject to locking).
Alternatives Considered
Pure lock-based idempotency — not sufficient for catch-up behavior.
Additional Context
Ensure pruning to avoid unbounded growth; TTL or periodic cleanup rake task.
Checklist
- I have searched for a similar feature request and didn't find any duplicates.
- I have included all the required information.
- I have tagged the issue with the label "enhancement".
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Ready