Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FuncMap = map[string]func(ctx context.Context, ts *TaskScheduler){ "fetch_lianjia_house": FetchLianjiaHouse, }
View Source
var ProviderSet = wire.NewSet(NewTaskScheduler)
ProviderSet is server providers.
Functions ¶
func FetchLianjiaHouse ¶
func FetchLianjiaHouse(ctx context.Context, ts *TaskScheduler)
Types ¶
type CronTaskStatus ¶
type CronTaskStatus string
const ( CronTaskKey = "cron_task" CronTaskStatusKey = "cron_task_%s_status" CronTaskStatusFailed CronTaskStatus = "failed" CronTaskStatusSuccess CronTaskStatus = "success" CronTaskStatusRunning CronTaskStatus = "running" )
type TaskScheduler ¶
type TaskScheduler struct {
// contains filtered or unexported fields
}
func NewTaskScheduler ¶
func NewTaskScheduler(confData *conf.Data, uc *biz.LianjiaUsecase, svc *service.Service, redisClient *redis.Client, repo biz.LianjiaRepo, logger log.Logger) *TaskScheduler
func (*TaskScheduler) StartAllTask ¶
func (taskScheduler *TaskScheduler) StartAllTask() error
Click to show internal directories.
Click to hide internal directories.