Former-commit-id: 28da880d850ec7649bbde5638b02629299561a86
This commit is contained in:
tzwang 2024-05-22 11:52:05 +08:00
commit 7fcfcfe7ac
2 changed files with 18 additions and 21 deletions

View File

@ -112,8 +112,6 @@ func (s *AiStorage) SaveAiTask(taskId int64, option *option.AiOption, clusterId
return err
}
del, _ := time.Parse(constants.Layout, constants.Layout)
aiTaskModel := models.TaskAi{
TaskId: taskId,
AdapterId: aId,
@ -127,7 +125,6 @@ func (s *AiStorage) SaveAiTask(taskId int64, option *option.AiOption, clusterId
Status: status,
Msg: msg,
Card: option.ComputeCard,
DeletedAt: del,
CommitTime: time.Now(),
}
// 保存任务数据到数据库

View File

@ -36,24 +36,24 @@ type (
}
TaskAi struct {
Id int64 `db:"id"` // id
TaskId int64 `db:"task_id"` // 任务id
AdapterId int64 `db:"adapter_id"` // 适配器id
AdapterName string `db:"adapter_name"` // 适配器名称
ClusterId int64 `db:"cluster_id"` // 集群id
ClusterName string `db:"cluster_name"` // 集群名称
Name string `db:"name"` // 任务名
Replica int64 `db:"replica"` // 执行数
JobId string `db:"job_id"` // 集群返回任务id
Strategy string `db:"strategy"` // 主任务使用策略
Status string `db:"status"` // 任务状态
Msg string `db:"msg"` // 集群返回任务信息
CommitTime time.Time `db:"commit_time"` // 提交时间
StartTime string `db:"start_time"` // 开始时间
EndTime string `db:"end_time"` // 结束时间
TaskType string `db:"task_type"`
DeletedAt time.Time `db:"deleted_at"`
Card string `db:"card"`
Id int64 `db:"id"` // id
TaskId int64 `db:"task_id"` // 任务id
AdapterId int64 `db:"adapter_id"` // 适配器id
AdapterName string `db:"adapter_name"` // 适配器名称
ClusterId int64 `db:"cluster_id"` // 集群id
ClusterName string `db:"cluster_name"` // 集群名称
Name string `db:"name"` // 任务名
Replica int64 `db:"replica"` // 执行数
JobId string `db:"job_id"` // 集群返回任务id
Strategy string `db:"strategy"` // 主任务使用策略
Status string `db:"status"` // 任务状态
Msg string `db:"msg"` // 集群返回任务信息
CommitTime time.Time `db:"commit_time"` // 提交时间
StartTime string `db:"start_time"` // 开始时间
EndTime string `db:"end_time"` // 结束时间
TaskType string `db:"task_type"`
DeletedAt *time.Time `db:"deleted_at"`
Card string `db:"card"`
}
)