From 14014ee2295d60e33c6fe10d8e47760a474528f1 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Wed, 27 Sep 2023 14:49:52 +0800 Subject: [PATCH] =?UTF-8?q?rpc=20client=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 6bf0776d9e78e63592fd009d9b9a24c678cb4663 --- api/internal/logic/core/scheduletaskbyyamllogic.go | 2 +- pkg/constants/participant.go | 6 ++++++ pkg/constants/task.go | 9 +-------- 3 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 pkg/constants/participant.go 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" )