Browse Source

添加日志

pull/343/head
zhangwei 1 year ago
parent
commit
0005bfcd07
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      internal/logic/hpc/commithpctasklogic.go

+ 5
- 1
internal/logic/hpc/commithpctasklogic.go 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
}

Loading…
Cancel
Save