forked from JointCloud/pcm-coordinator
添加日志
This commit is contained in:
parent
44aca8bc0e
commit
0005bfcd07
|
@ -92,7 +92,9 @@ func (l *CommitHpcTaskLogic) CommitHpcTask(req *types.CommitHpcTaskReq) (resp *t
|
||||||
return nil, tx.Error
|
return nil, tx.Error
|
||||||
}
|
}
|
||||||
// 提交job到指定集群
|
// 提交job到指定集群
|
||||||
|
logx.Info("提交job到指定集群")
|
||||||
jobId, err := submitJob(&hpcInfo, &clusterInfo, server)
|
jobId, err := submitJob(&hpcInfo, &clusterInfo, server)
|
||||||
|
logx.Info("提交job到指定集群完成")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -141,12 +143,14 @@ func submitJob(hpcInfo *models.TaskHpc, clusterInfo *types.ClusterInfo, adapterA
|
||||||
}
|
}
|
||||||
var resp v1.SubmitJobResp
|
var resp v1.SubmitJobResp
|
||||||
httpClient := resty.New().R()
|
httpClient := resty.New().R()
|
||||||
|
logx.Info("远程调用p端接口开始")
|
||||||
_, err := httpClient.SetHeader("Content-Type", "application/json").
|
_, err := httpClient.SetHeader("Content-Type", "application/json").
|
||||||
SetBody(SubmitJobReq).
|
SetBody(SubmitJobReq).
|
||||||
SetResult(&resp).
|
SetResult(&resp).
|
||||||
Post(adapterAddress + "/api/v1/job/submit")
|
Post(adapterAddress + "/api/v1/job/submit")
|
||||||
|
logx.Info("远程调用p端接口完成")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
}
|
}
|
||||||
return resp.JobId, nil
|
return resp.JobId, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue