refactor(drivers): decouple inproc cron from inproc worker and satisfy linter

This commit is contained in:
ryan
2026-08-28 15:17:11 +08:00
parent 0ff117da47
commit 06508b6f13
6 changed files with 60 additions and 20 deletions
@@ -9,6 +9,7 @@ import (
"sync"
"Wavelet/core"
"Wavelet/core/contracts"
)
// Plugin implements core.Plugin and core.Driver for in-process cron job scheduling.
@@ -62,7 +63,8 @@ func (p *Plugin) Start(_ context.Context) error {
defer p.mu.Unlock()
if p.scheduler == nil {
p.scheduler = newInprocScheduler(p.coreCtx.Schedules(), p.coreCtx.Tasks())
taskSvc, _ := core.Inject[contracts.TaskService](p.coreCtx)
p.scheduler = newInprocScheduler(p.coreCtx.Schedules(), p.coreCtx.Tasks(), taskSvc)
}
return p.scheduler.Start()