exhibition-main/pkg/service/cron.go
2024-02-01 13:44:54 +08:00

15 lines
235 B
Go

package service
import (
"dubbo.apache.org/dubbo-go/v3/config"
"github.com/robfig/cron/v3"
)
func Task(c *cron.Cron) {
if config.GetConsumerService("ArtworkClientImpl") != nil {
_, _ = c.AddFunc("@every 5m", func() {
})
}
}