添加environment变量
Former-commit-id: 0d3eeef29aa9df5c9380874dc41e7a5fd07b3d68
This commit is contained in:
parent
f7f46e8561
commit
a322bb080a
|
@ -98,7 +98,7 @@ type HpcInfo struct {
|
|||
Account string `json:"account"`
|
||||
WorkDir string `json:"work_dir"` // 工作路径
|
||||
AssocId int64 `json:"assoc_id"`
|
||||
Partition string `json:"partition"`
|
||||
Partition string `json:"partition,omitempty,optional"`
|
||||
ExitCode int64 `json:"exit_code"`
|
||||
WallTime string `json:"wall_time"` // 最大运行时间
|
||||
Result string `json:"result"` // 运行结果
|
||||
|
@ -112,7 +112,7 @@ type HpcInfo struct {
|
|||
StdOutFile string `json:"std_out_file"` // 工作路径/std.err.%j
|
||||
StdErrFile string `json:"std_err_file"` // 工作路径/std.err.%j
|
||||
StdInput string `json:"std_input"`
|
||||
Environment string `json:"environment"`
|
||||
Environment map[string]string `json:"environment"`
|
||||
DeletedFlag int64 `json:"deleted_flag"` // 是否删除(0-否,1-是)
|
||||
CreatedBy int64 `json:"created_by"` // 创建人
|
||||
CreatedTime time.Time `json:"created_time"` // 创建时间
|
||||
|
|
|
@ -867,6 +867,7 @@ type (
|
|||
ProducerDict string `json:"producerDict,optional"`
|
||||
RegionDict string `json:"regionDict,optional"`
|
||||
RegionName string `json:"regionName,optional"`
|
||||
Environment map[string]string `json:"environment,optional"`
|
||||
}
|
||||
ClusterInfo {
|
||||
Id string `json:"id,omitempty" db:"id"`
|
||||
|
@ -891,6 +892,7 @@ type (
|
|||
RegionDict string `json:"regionDict,omitempty" db:"region_dict"`
|
||||
Location string `json:"location,omitempty" db:"location"`
|
||||
CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
||||
Environment map[string]string `json:"environment,omitempty" db:"environment"`
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ info(
|
|||
type (
|
||||
commitHpcTaskReq {
|
||||
Name string `json:"name"` // paratera:jobName
|
||||
Account string `json:"account,optional"`
|
||||
Description string `json:"description,optional"`
|
||||
TenantId int64 `json:"tenantId,optional"`
|
||||
TaskId int64 `json:"taskId,optional"`
|
||||
|
|
|
@ -1060,4 +1060,3 @@ service pcm {
|
|||
@handler scheduleSituationHandler
|
||||
get /monitoring/schedule/situation returns (scheduleSituationResp)
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ func PullTaskInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
}
|
||||
|
||||
l := core.NewPullTaskInfoLogic(r.Context(), svcCtx)
|
||||
resp, err := l.PullTaskInfo((*clientCore.PullTaskInfoReq)(&req))
|
||||
resp, err := l.PullTaskInfo(&req)
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,6 +7,7 @@ import (
|
|||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models/cloud"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils"
|
||||
"gitlink.org.cn/jcce-pcm/utils/tool"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
|
@ -50,7 +51,7 @@ func (l *PullTaskInfoLogic) PullTaskInfo(req *clientCore.PullTaskInfoReq) (*clie
|
|||
}
|
||||
var clusterType string
|
||||
l.svcCtx.DbEngin.Raw("SELECT label FROM `t_cluster` where id = ? ", hpcInfo.ClusterId).Scan(&clusterType)
|
||||
|
||||
tool.Convert(hpcInfo.Environment, &resp.HpcInfoList[i].Environment)
|
||||
resp.HpcInfoList[i].ClusterType = clusterType
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,6 +87,7 @@ func (l *CommitHpcTaskLogic) CommitHpcTask(req *types.CommitHpcTaskReq) (resp *t
|
|||
Queue: req.Queue,
|
||||
SubmitType: req.SubmitType,
|
||||
NNode: req.NNode,
|
||||
Account: req.Account,
|
||||
StdOutFile: req.StdOutFile,
|
||||
StdErrFile: req.StdErrFile,
|
||||
StdInput: req.StdInput,
|
||||
|
|
12139
internal/types/types.go
12139
internal/types/types.go
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue