跳过压测的订单数据

This commit is contained in:
李子铭 2025-03-20 10:18:11 +08:00
parent 964f3cd5cf
commit c00d947678
2 changed files with 9 additions and 7 deletions

View File

@ -30,6 +30,14 @@ func NewCronServer(
}
}
// Start .
// 每五秒: */5 * * * * ?
// 每隔1分钟执行一次"0 */1 * * * ?"
// 每天23点执行一次"0 0 23 * * ?"
// 每天凌晨1点执行一次"0 0 1 * * ?"
// 每月1号凌晨1点执行一次"0 0 1 1 * ?"
// 在26分、29分、33分执行一次"0 26,29,33 * * * ?"
// 每天的0点、13点、18点、21点都执行一次"0 0 0,13,18,21 * * ?"
func (cs *CronServer) Start(ctx context.Context) error {
if !cs.conf.Cron.IsOpen {
@ -43,6 +51,7 @@ func (cs *CronServer) Start(ctx context.Context) error {
}
cs.cron.Start()
return nil
}

View File

@ -25,13 +25,6 @@ func (s *VoucherService) CronOrderNotice(ctx context.Context) error {
return nil
}
// 每五秒: */5 * * * * ?
// 每隔1分钟执行一次"0 */1 * * * ?"
// 每天23点执行一次"0 0 23 * * ?"
// 每天凌晨1点执行一次"0 0 1 * * ?"
// 每月1号凌晨1点执行一次"0 0 1 1 * ?"
// 在26分、29分、33分执行一次"0 26,29,33 * * * ?"
// 每天的0点、13点、18点、21点都执行一次"0 0 0,13,18,21 * * ?"
return s.cron.AddFunc(c.Command, func() {
s.OrderNotice(ctx)