Skip to content

Commit

Permalink
fix: bmw cmdb缓存任务兼容空的拓扑树 --bug=125655527 (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
unique0lai authored Jun 12, 2024
1 parent 43c57ba commit cd60448
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/bk-monitor-worker/internal/alarm/cmdbcache/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,10 @@ func getHostAndTopoByBiz(ctx context.Context, bkBizID int) ([]*AlarmHostInfo, *c
return nil, nil, err
}

if len(bizInstTopoResp.Data) == 0 {
return hosts, nil, nil
}

// 查询业务下的内置节点
var bizInternalModuleResp cmdb.GetBizInternalModuleResp
_, err = cmdbApi.GetBizInternalModule().SetBody(map[string]interface{}{"bk_biz_id": bkBizID}).SetResult(&bizInternalModuleResp).Request()
Expand Down

0 comments on commit cd60448

Please sign in to comment.