MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / NewCronJobService

Function NewCronJobService

internal/service/sql_job.go:22–28  ·  view source on GitHub ↗
(repo repository.CronJobRepository, l *zap.Logger)

Source from the content-addressed store, hash-verified

20}
21
22func 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 获取一个任务,并启动一个协程定期刷新任务的更新时间
31func (c *cronJobService) Preempt(ctx context.Context) (domain.Job, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected