go-common/app/job/openplatform/article/service/cron.go
2019-04-22 18:49:16 +08:00

22 lines
412 B
Go

package service
import (
"context"
"time"
"go-common/app/job/openplatform/article/dao"
"go-common/library/log"
)
func (s *Service) updateSortproc() {
for {
if err := s.UpdateSort(context.TODO()); err != nil {
log.Error("s.UpdateSort error(%+v)", err)
dao.PromError("service:刷新分区投稿")
} else {
dao.PromInfo("service:刷新分区投稿")
}
time.Sleep(s.updateSortInterval)
}
}