(repo repository.CronJobRepository, l *zap.Logger)
| 20 | } |
| 21 | |
| 22 | func NewCronJobService(repo repository.CronJobRepository, l *zap.Logger) CronJobService { |
| 23 | return &cronJobService{ |
| 24 | repo: repo, |
| 25 | l: l, |
| 26 | refreshInterval: time.Minute, |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | // Preempt 获取一个任务,并启动一个协程定期刷新任务的更新时间 |
| 31 | func (c *cronJobService) Preempt(ctx context.Context) (domain.Job, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected