P3.3: Apply execution mode + overlap policy in dispatch
Rework RunDue/startRunLocked/executeRun so the ExecutionMode and OverlapPolicy config knobs take effect: - startRunLocked advances NextDue to the next occurrence instead of zeroing it, keeping the schedule marching during an in-flight run. - RunDue scans all due jobs: parallel starts every due, non-running job; sequential defers a due job while any other job runs. When a job comes due again mid-run, skip drops it and queue marks it Pending; either way NextDue is advanced past the fired occurrence. - executeRun re-runs a Pending job once the current run finishes. - RunNow gains a sequential-mode guard refusing a manual run while another job is running. - Add anyRunningLocked and advanceNextDueLocked helpers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -96,7 +96,7 @@ These land together because both edit `domain/job.go` and `storage/store.go`.
|
||||
### Phase 3 — Task-queue model + settings
|
||||
- [x] P3.1 — Config/runtime fields + defaults
|
||||
- [x] P3.2 — Split dispatch into `app/run.go`
|
||||
- [ ] P3.3 — Rework `RunDue`/`executeRun` for mode + overlap policy
|
||||
- [x] P3.3 — Rework `RunDue`/`executeRun` for mode + overlap policy
|
||||
- [ ] P3.4 — Settings Queue selects
|
||||
- [ ] P3.5 — Queue tests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user