diff --git a/api/internal/logic/core/scheduletaskbyyamllogic.go b/api/internal/logic/core/scheduletaskbyyamllogic.go index e04a3871..6b5dbf7e 100644 --- a/api/internal/logic/core/scheduletaskbyyamllogic.go +++ b/api/internal/logic/core/scheduletaskbyyamllogic.go @@ -35,7 +35,7 @@ func (l *ScheduleTaskByYamlLogic) ScheduleTaskByYaml(req *types.ScheduleTaskByYa } // 构建主任务结构体 taskModel := models.Task{ - Status: constants.TASK_STATUS_SAVED, + Status: constants.Saved, Description: req.Description, Name: req.Name, YamlString: string(bytes), diff --git a/pkg/constants/participant.go b/pkg/constants/participant.go new file mode 100644 index 00000000..3b4a65e7 --- /dev/null +++ b/pkg/constants/participant.go @@ -0,0 +1,6 @@ +package constants + +const ( + Kubernetes = "Kubernetes" + Slurm = "Slurm" +) diff --git a/pkg/constants/task.go b/pkg/constants/task.go index f81ff21f..f9bdda39 100644 --- a/pkg/constants/task.go +++ b/pkg/constants/task.go @@ -2,12 +2,5 @@ package constants // 任务类型 const ( - TASK_TYPE_CLOUD = 1 - TASK_TYPE_HPC = 2 - TASK_TYPE_AI = 3 -) - -const ( - Kubernetes = "Kubernetes" - Slurm = "Slurm" + Saved = "Saved" )