30 lines
955 B
Go
30 lines
955 B
Go
package task
|
|
|
|
import (
|
|
"git.huangwc.com/pig/pig-farm-controller/internal/infra/logs"
|
|
"git.huangwc.com/pig/pig-farm-controller/internal/infra/models"
|
|
)
|
|
|
|
// PlanAnalysisTask 用于在任务执行队列中触发一个plan的执行
|
|
// 该任务会解析plan生成扁平化的待执行任务表, 并将任务列表插入任务执行队列
|
|
// 该任务会预写入plan所有待执行任务的执行日志
|
|
// 每个plan执行完毕时 或 创建plan时 都应该重新创建一个 PlanAnalysisTask 以便触发下次plan执行
|
|
// 更新plan后应当更新对应 PlanAnalysisTask
|
|
type PlanAnalysisTask struct {
|
|
}
|
|
|
|
func (p *PlanAnalysisTask) Execute() error {
|
|
//TODO implement me
|
|
panic("implement me")
|
|
}
|
|
|
|
func (p *PlanAnalysisTask) ParseParams(logger *logs.Logger, claimedLog *models.TaskExecutionLog) error {
|
|
//TODO implement me
|
|
panic("implement me")
|
|
}
|
|
|
|
func (p *PlanAnalysisTask) OnFailure(executeErr error) {
|
|
//TODO implement me
|
|
panic("implement me")
|
|
}
|