12345678910111213141516171819202122232425262728293031 |
- package sms
- import (
- logger "eta/eta_mini_ht_api/common/component/log"
- "eta/eta_mini_ht_api/domian/sms"
- "eta/eta_mini_ht_api/task/base"
- )
- var (
- taskName base.TaskType = "ExpiredCodeTask"
- cron = "0/10 * * * * *"
- )
- // Execute Task ETA取研报的数据
- func (st *SMSTask) Execute(taskDetail *base.TaskDetail) error {
- //logger.Info(contants.TaskFormat, "处理过期短信开始")
- err := sms.VerifiedCodeTask()
- if err != nil {
- logger.Error("自动更新短信状态失败:%v", err)
- }
- //logger.Info(contants.TaskFormat, "处理过期短信结束")
- return err
- }
- type SMSTask struct {
- }
- func init() {
- smsTask := base.NewTask(taskName, cron, new(SMSTask), base.PROD)
- base.RegisterTask(&smsTask)
- }
|