Merge pull request 'bug fix' (#328) from zhangweiii/pcm-coordinator:master into master

Former-commit-id: a2dffbc56280a038a8e798125ab18ec73fbbd0f4
This commit is contained in:
zhangweiii 2024-10-31 17:32:07 +08:00
commit ed5da106d4
2 changed files with 32 additions and 33 deletions

View File

@ -1071,4 +1071,3 @@ service pcm {
@handler scheduleSituationHandler
get /monitoring/schedule/situation returns (scheduleSituationResp)
}

View File

@ -30,7 +30,7 @@ func NewCommitHpcTaskLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Com
func (l *CommitHpcTaskLogic) CommitHpcTask(req *types.CommitHpcTaskReq) (resp *types.CommitHpcTaskResp, err error) {
var clusterInfo types.ClusterInfo
l.svcCtx.DbEngin.Raw("SELECT * FROM `t_cluster` where id = ? and label = ?", req.ClusterId, req.ClusterType).First(&clusterInfo)
l.svcCtx.DbEngin.Raw("SELECT * FROM `t_cluster` where id = ?", req.ClusterId).First(&clusterInfo)
if len(clusterInfo.Id) == 0 {
resp.Code = 400