定义ReleaseFeedWeightTask并注入依赖
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package task
|
||||
|
||||
import (
|
||||
"git.huangwc.com/pig/pig-farm-controller/internal/infra/logs"
|
||||
"git.huangwc.com/pig/pig-farm-controller/internal/infra/models"
|
||||
)
|
||||
|
||||
@@ -13,9 +12,6 @@ type Task interface {
|
||||
// 返回的 error 表示任务是否执行成功。调度器会根据返回的 error 是否为 nil 来决定任务状态。
|
||||
Execute() error
|
||||
|
||||
// ParseParams 解析及校验参数
|
||||
ParseParams(logger *logs.Logger, claimedLog *models.TaskExecutionLog) error
|
||||
|
||||
// OnFailure 定义了当 Execute 方法返回错误时,需要执行的回滚或清理逻辑。
|
||||
// log: 任务执行的上下文。
|
||||
// executeErr: 从 Execute 方法返回的原始错误。
|
||||
|
||||
Reference in New Issue
Block a user