T2.2: Migrate scheduler to use domain.Schedule
Parse each job's schedule once on load (resetNextRuns) and on edit (RefreshSchedule) via the new parseJobSchedule helper, caching the result in a map[int]domain.Schedule keyed by job ID. prepareNextRun now looks up the cached Schedule instead of re-parsing the string on every call. Remove the nextRunTime wrapper that did the per-call parsing. Drop the three scheduler_test.go tests that duplicated coverage already in domain/schedule_test.go. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -255,7 +255,7 @@ Track progress here. Mark tasks complete as they land and pass review.
|
||||
|
||||
### Phase 2 — Domain cleanup
|
||||
- [x] T2.1 — Add `src/domain/schedule.go`; Schedule value object
|
||||
- [ ] T2.2 — Migrate `scheduler` to use Schedule
|
||||
- [x] T2.2 — Migrate `scheduler` to use Schedule
|
||||
- [ ] T2.3 — Split `domain.Job` (durable) from `domain.JobRuntime` (transient)
|
||||
- [ ] T2.4 — Update `storage`: load/save Job only; move runtime init
|
||||
|
||||
|
||||
Reference in New Issue
Block a user