优化定时任务

This commit is contained in:
ryan
2026-06-11 09:20:28 +08:00
parent b5a1707898
commit 786fe71778
5 changed files with 84 additions and 16 deletions
-2
View File
@@ -8,7 +8,6 @@ import (
"time"
"github.com/Rain-kl/Wavelet/internal/db"
"github.com/Rain-kl/Wavelet/internal/db/idgen"
)
// Schedule 定时任务配置表
@@ -30,7 +29,6 @@ func (Schedule) TableName() string {
// CreateSchedule 创建定时任务
func CreateSchedule(ctx context.Context, schedule *Schedule) error {
schedule.ID = idgen.NextUint64ID()
return db.DB(ctx).Create(schedule).Error
}