From 755174effa7c5daa722d5aa191c0014bfc77bd0e Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Mon, 11 Nov 2024 19:01:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=B6=85=E7=AE=97=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=A2=9E=E5=8A=A0proxy=20address?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- desc/core/pcm-core.api | 2 ++ go.mod | 2 +- go.sum | 4 ++-- internal/logic/hpc/commithpctasklogic.go | 2 +- internal/types/types.go | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/desc/core/pcm-core.api b/desc/core/pcm-core.api index 8b3064f2..b036a28c 100644 --- a/desc/core/pcm-core.api +++ b/desc/core/pcm-core.api @@ -926,6 +926,7 @@ type ( EnvPath string `json:"envPath,omitempty" db:"env_path"` EnvLdPath string `json:"envLdPath,omitempty" db:"env_ld_path"` WorkDir string `json:"workDir,omitempty" db:"work_dir"` + ProxyAddress string `json:"proxyAddress,omitempty" db:"proxy_address"` } ) @@ -1350,6 +1351,7 @@ type ( Status string `json:"status" db:"status"` Remark string `json:"remark" db:"remark"` InferUrl string `json:"inferUrl"` + WorkDir string `json:"workDir"` } ) diff --git a/go.mod b/go.mod index 6d42b6a9..2beabfae 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/zeromicro/go-zero v1.7.3 gitlink.org.cn/JointCloud/pcm-ac v0.0.0-20240920093406-601f283f0185 - gitlink.org.cn/JointCloud/pcm-hpc v0.0.0-20241104040331-d3a6eb951631 + gitlink.org.cn/JointCloud/pcm-hpc v0.0.0-20241111104559-4c3cefb0ea29 gitlink.org.cn/JointCloud/pcm-modelarts v0.0.0-20240918011543-482dcd609877 gitlink.org.cn/JointCloud/pcm-octopus v0.0.0-20240817071412-44397870b110 gitlink.org.cn/JointCloud/pcm-openstack v0.0.0-20240403033338-e7edabad4203 diff --git a/go.sum b/go.sum index b61a887f..ac2042b5 100644 --- a/go.sum +++ b/go.sum @@ -467,8 +467,8 @@ github.com/zeromicro/go-zero v1.7.3 h1:yDUQF2DXDhUHc77/NZF6mzsoRPMBfldjPmG2O/ZSz github.com/zeromicro/go-zero v1.7.3/go.mod h1:9JIW3gHBGuc9LzvjZnNwINIq9QdiKu3AigajLtkJamQ= gitlink.org.cn/JointCloud/pcm-ac v0.0.0-20240920093406-601f283f0185 h1:B+YBB5xHlIAS6ILuaCGQwbOpr/L6LOHAlj9PeFUCetM= gitlink.org.cn/JointCloud/pcm-ac v0.0.0-20240920093406-601f283f0185/go.mod h1:3eECiw9O2bIFkkePlloKyLNXiqBAhOxNrDoGaaGseGY= -gitlink.org.cn/JointCloud/pcm-hpc v0.0.0-20241104040331-d3a6eb951631 h1:udsOCXqZslipOlDEaxaVaG8gRZzieiRhTfSSnJYSc+E= -gitlink.org.cn/JointCloud/pcm-hpc v0.0.0-20241104040331-d3a6eb951631/go.mod h1:2/lG00ZhmS8wURzNSCTLexeGDvqYmZgHbCRnNCSqZaY= +gitlink.org.cn/JointCloud/pcm-hpc v0.0.0-20241111104559-4c3cefb0ea29 h1:NAgDiTjUvXLjCxBVjRnM6tmFDt/so24mo//hP7dYFeE= +gitlink.org.cn/JointCloud/pcm-hpc v0.0.0-20241111104559-4c3cefb0ea29/go.mod h1:uYQ84nW9pyE8CvJDyurHOxWUSCmUTjmaHnPP9vbKaDU= gitlink.org.cn/JointCloud/pcm-modelarts v0.0.0-20240918011543-482dcd609877 h1:a+1FpxqLPRojlAkJlAeRhKRbxajymXYgrM+s9bfQx0E= gitlink.org.cn/JointCloud/pcm-modelarts v0.0.0-20240918011543-482dcd609877/go.mod h1:/eOmBFZKWGoabG3sRVkVvIbLwsd2631k4jkUBR6x1AA= gitlink.org.cn/JointCloud/pcm-octopus v0.0.0-20240817071412-44397870b110 h1:GaXwr5sgDh0raHjUf9IewTvnRvajYea7zbLsaerYyXo= diff --git a/internal/logic/hpc/commithpctasklogic.go b/internal/logic/hpc/commithpctasklogic.go index 37fde84c..7ef3b09d 100644 --- a/internal/logic/hpc/commithpctasklogic.go +++ b/internal/logic/hpc/commithpctasklogic.go @@ -145,7 +145,7 @@ func submitJob(hpcInfo *models.TaskHpc, clusterInfo *types.ClusterInfo) (string, submitReq.Job.StandardOutput = submitReq.Job.CurrentWorkingDirectory + "/%j.out" submitReq.Job.StandardError = submitReq.Job.CurrentWorkingDirectory + "/%j.err" - jobResp, err := job.SubmitJob(submitReq) + jobResp, err := job.SubmitJob(clusterInfo.ProxyAddress, submitReq) if err != nil { return "", err } diff --git a/internal/types/types.go b/internal/types/types.go index 11b182ec..c4a272bd 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -859,6 +859,7 @@ type ClusterInfo struct { EnvPath string `json:"envPath,omitempty" db:"env_path"` EnvLdPath string `json:"envLdPath,omitempty" db:"env_ld_path"` WorkDir string `json:"workDir,omitempty" db:"work_dir"` + ProxyAddress string `json:"proxyAddress,omitempty" db:"proxy_address"` } type ClusterDelReq struct {