添加environment变量
Former-commit-id: 0d3eeef29aa9df5c9380874dc41e7a5fd07b3d68
This commit is contained in:
parent
f7f46e8561
commit
a322bb080a
|
@ -75,49 +75,49 @@ type PushNoticeResp struct {
|
|||
}
|
||||
|
||||
type HpcInfo struct {
|
||||
Id int64 `json:"id"` // id
|
||||
TaskId int64 `json:"task_id"` // 任务id
|
||||
JobId string `json:"job_id"` // 作业id(在第三方系统中的作业id)
|
||||
AdapterId int64 `json:"adapter_id"` // 执行任务的适配器id
|
||||
AdapterName string `json:"adapterName,omitempty,optional"`
|
||||
ClusterId int64 `json:"cluster_id"` // 执行任务的集群id
|
||||
ClusterName string `json:"clusterName,omitempty,optional"`
|
||||
ClusterType string `json:"cluster_type"` // 执行任务的集群类型
|
||||
Name string `json:"name"` // 名称
|
||||
Status string `json:"status"` // 状态
|
||||
CmdScript string `json:"cmd_script"`
|
||||
StartTime string `json:"start_time"` // 开始时间
|
||||
RunningTime int64 `json:"running_time"` // 运行时间
|
||||
DerivedEs string `json:"derived_es"`
|
||||
Cluster string `json:"cluster"`
|
||||
BlockId int64 `json:"block_id"`
|
||||
AllocNodes int64 `json:"alloc_nodes"`
|
||||
AllocCpu int64 `json:"alloc_cpu"`
|
||||
CardCount int64 `json:"card_count"` // 卡数
|
||||
Version string `json:"version"`
|
||||
Account string `json:"account"`
|
||||
WorkDir string `json:"work_dir"` // 工作路径
|
||||
AssocId int64 `json:"assoc_id"`
|
||||
Partition string `json:"partition"`
|
||||
ExitCode int64 `json:"exit_code"`
|
||||
WallTime string `json:"wall_time"` // 最大运行时间
|
||||
Result string `json:"result"` // 运行结果
|
||||
DeletedAt sql.NullTime `json:"deleted_at"` // 删除时间
|
||||
YamlString string `json:"yaml_string"`
|
||||
AppType string `json:"app_type"` // 应用类型
|
||||
AppName string `json:"app_name"` // 应用名称
|
||||
Queue string `json:"queue"` // 队列名称
|
||||
SubmitType string `json:"submit_type"` // cmd(命令行模式)
|
||||
NNode string `json:"n_node"` // 节点个数(当指定该参数时,GAP_NODE_STRING必须为"")
|
||||
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"`
|
||||
DeletedFlag int64 `json:"deleted_flag"` // 是否删除(0-否,1-是)
|
||||
CreatedBy int64 `json:"created_by"` // 创建人
|
||||
CreatedTime time.Time `json:"created_time"` // 创建时间
|
||||
UpdatedBy int64 `json:"updated_by"` // 更新人
|
||||
UpdatedTime time.Time `json:"updated_time"` // 更新时间
|
||||
Id int64 `json:"id"` // id
|
||||
TaskId int64 `json:"task_id"` // 任务id
|
||||
JobId string `json:"job_id"` // 作业id(在第三方系统中的作业id)
|
||||
AdapterId int64 `json:"adapter_id"` // 执行任务的适配器id
|
||||
AdapterName string `json:"adapterName,omitempty,optional"`
|
||||
ClusterId int64 `json:"cluster_id"` // 执行任务的集群id
|
||||
ClusterName string `json:"clusterName,omitempty,optional"`
|
||||
ClusterType string `json:"cluster_type"` // 执行任务的集群类型
|
||||
Name string `json:"name"` // 名称
|
||||
Status string `json:"status"` // 状态
|
||||
CmdScript string `json:"cmd_script"`
|
||||
StartTime string `json:"start_time"` // 开始时间
|
||||
RunningTime int64 `json:"running_time"` // 运行时间
|
||||
DerivedEs string `json:"derived_es"`
|
||||
Cluster string `json:"cluster"`
|
||||
BlockId int64 `json:"block_id"`
|
||||
AllocNodes int64 `json:"alloc_nodes"`
|
||||
AllocCpu int64 `json:"alloc_cpu"`
|
||||
CardCount int64 `json:"card_count"` // 卡数
|
||||
Version string `json:"version"`
|
||||
Account string `json:"account"`
|
||||
WorkDir string `json:"work_dir"` // 工作路径
|
||||
AssocId int64 `json:"assoc_id"`
|
||||
Partition string `json:"partition,omitempty,optional"`
|
||||
ExitCode int64 `json:"exit_code"`
|
||||
WallTime string `json:"wall_time"` // 最大运行时间
|
||||
Result string `json:"result"` // 运行结果
|
||||
DeletedAt sql.NullTime `json:"deleted_at"` // 删除时间
|
||||
YamlString string `json:"yaml_string"`
|
||||
AppType string `json:"app_type"` // 应用类型
|
||||
AppName string `json:"app_name"` // 应用名称
|
||||
Queue string `json:"queue"` // 队列名称
|
||||
SubmitType string `json:"submit_type"` // cmd(命令行模式)
|
||||
NNode string `json:"n_node"` // 节点个数(当指定该参数时,GAP_NODE_STRING必须为"")
|
||||
StdOutFile string `json:"std_out_file"` // 工作路径/std.err.%j
|
||||
StdErrFile string `json:"std_err_file"` // 工作路径/std.err.%j
|
||||
StdInput string `json:"std_input"`
|
||||
Environment map[string]string `json:"environment"`
|
||||
DeletedFlag int64 `json:"deleted_flag"` // 是否删除(0-否,1-是)
|
||||
CreatedBy int64 `json:"created_by"` // 创建人
|
||||
CreatedTime time.Time `json:"created_time"` // 创建时间
|
||||
UpdatedBy int64 `json:"updated_by"` // 更新人
|
||||
UpdatedTime time.Time `json:"updated_time"` // 更新时间
|
||||
}
|
||||
|
||||
type CloudInfo struct {
|
||||
|
|
|
@ -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"`
|
||||
|
|
|
@ -387,7 +387,7 @@ service pcm {
|
|||
@doc "文本识别"
|
||||
@handler ChatHandler
|
||||
post /ai/chat (ChatReq) returns (ChatResult)
|
||||
/******chat end***********/
|
||||
/******chat end***********/
|
||||
}
|
||||
|
||||
//screen接口
|
||||
|
@ -1059,5 +1059,4 @@ 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,
|
||||
|
|
12417
internal/types/types.go
12417
internal/types/types.go
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue