Merge pull request 'fix bug' (#162) from zhouqunjie/pcm-coordinator:master into master
Former-commit-id: 0e915b60db1bddd01388c7eb2bbfb91784f0994f
This commit is contained in:
commit
60b2c9d4dc
|
@ -50,6 +50,11 @@ func (l *CommitHpcTaskLogic) CommitHpcTask(req *types.CommitHpcTaskReq) (resp *t
|
|||
|
||||
var clusterIds []int64
|
||||
l.svcCtx.DbEngin.Raw("SELECT id FROM `t_cluster` where adapter_id in ? and label = ?", req.AdapterIds, req.ClusterType).Scan(&clusterIds)
|
||||
if len(clusterIds) == 0 || clusterIds == nil {
|
||||
resp.Code = 400
|
||||
resp.Msg = "no cluster found"
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
var clusterName string
|
||||
var adapterId int64
|
||||
|
@ -61,12 +66,6 @@ func (l *CommitHpcTaskLogic) CommitHpcTask(req *types.CommitHpcTaskReq) (resp *t
|
|||
|
||||
env, _ := json.Marshal(req.Environment)
|
||||
|
||||
if len(clusterIds) == 0 || clusterIds == nil {
|
||||
resp.Code = 400
|
||||
resp.Msg = "no cluster found"
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
hpcInfo := models.TaskHpc{
|
||||
TaskId: taskModel.Id,
|
||||
AdapterId: uint(adapterId),
|
||||
|
|
Loading…
Reference in New Issue