Merge pull request 'fix aicenter bugs' (#189) from tzwang/pcm-coordinator:master into master

Former-commit-id: 1474ff0e48ea654d614575ef82780a1cb15bfe12
This commit is contained in:
tzwang 2024-05-20 19:14:55 +08:00
commit 2fe3f2f976
2 changed files with 12 additions and 0 deletions

View File

@ -99,11 +99,20 @@ func (l *GetCenterOverviewLogic) updateClusterResource(mu *sync.RWMutex, ch chan
}
wg.Add(1)
go func() {
_, ok := l.svcCtx.Scheduler.AiService.AiCollectorAdapterMap[adapter.Id][c.Id]
if !ok {
wg.Done()
return
}
stat, err := l.svcCtx.Scheduler.AiService.AiCollectorAdapterMap[adapter.Id][c.Id].GetResourceStats(l.ctx)
if err != nil {
wg.Done()
return
}
if stat == nil {
wg.Done()
return
}
clusterType, err := strconv.ParseInt(adapter.Type, 10, 64)
if err != nil {
wg.Done()

View File

@ -42,6 +42,9 @@ func (l *GetCenterQueueingLogic) GetCenterQueueing() (resp *types.CenterQueueing
if err != nil {
continue
}
if queues == nil {
continue
}
//todo sync current task queues
current := &types.CenterQueue{
Name: cluster.Name,