调整task工厂

This commit is contained in:
2025-09-25 09:07:32 +08:00
parent 0606be4711
commit fe549fca4a
3 changed files with 16 additions and 7 deletions

View File

@@ -20,6 +20,10 @@ type DelayTask struct {
logger *logs.Logger
}
func NewDelayTask() Task {
return &DelayTask{}
}
// Execute 执行延迟任务,等待指定的时间
func (d *DelayTask) Execute() error {
d.logger.Infof("任务 %v: 开始延迟 %v...", d.executionTask.TaskID, d.duration)