添加日志

This commit is contained in:
zhangwei 2024-11-11 21:04:36 +08:00
parent 44aca8bc0e
commit 0005bfcd07
1 changed files with 5 additions and 1 deletions

View File

@ -92,7 +92,9 @@ func (l *CommitHpcTaskLogic) CommitHpcTask(req *types.CommitHpcTaskReq) (resp *t
return nil, tx.Error
}
// 提交job到指定集群
logx.Info("提交job到指定集群")
jobId, err := submitJob(&hpcInfo, &clusterInfo, server)
logx.Info("提交job到指定集群完成")
if err != nil {
return nil, err
}
@ -141,12 +143,14 @@ func submitJob(hpcInfo *models.TaskHpc, clusterInfo *types.ClusterInfo, adapterA
}
var resp v1.SubmitJobResp
httpClient := resty.New().R()
logx.Info("远程调用p端接口开始")
_, err := httpClient.SetHeader("Content-Type", "application/json").
SetBody(SubmitJobReq).
SetResult(&resp).
Post(adapterAddress + "/api/v1/job/submit")
logx.Info("远程调用p端接口完成")
if err != nil {
return 0, err
}
return resp.JobId, nil
}