123456789101112131415161718192021222324252627282930313233343536 |
- package crontab
- import (
- "kpt-pasture/config"
- "kpt-pasture/service/asynqsvc"
- "kpt-pasture/service/redis"
- "kpt-pasture/store/kptstore"
- "gitee.com/xuyiping_admin/pkg/di"
- "go.uber.org/dig"
- )
- var Module = di.Options(di.Provide(NewCrontab))
- type Entry struct {
- dig.In
- Cfg *config.AppConfig
- DB *kptstore.DB
- AsynqClient asynqsvc.Client
- Redis *redis.CacheStoreRedisEntry
- }
- func NewCrontab(entry Entry) Crontab {
- return &entry
- }
- type Crontab interface {
- UpdateCowInfo() error
- GenerateAsynqWorkOrder() error
- ImmunizationPlan() error
- SameTimePlan() error
- UpdateSameTime() error
- SystemBasicCrontab() error
- PastureUpdateCowEstrus() error // 获取牛只发情数据 5分钟执行一下
- }
|