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

Former-commit-id: 065653b186be3b52ac45b2b5f36f3e574b501b38
This commit is contained in:
tzwang 2024-06-07 10:48:41 +08:00
commit 8bd0fcac07
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ func (l *GetCenterOverviewLogic) updateClusterResource(mu *sync.RWMutex, ch chan
mu.Lock()
if (models.TClusterResource{} == *clusterResource) {
err = l.svcCtx.Scheduler.AiStorages.SaveClusterResources(c.Id, c.Name, clusterType, float64(stat.CpuCoreAvail), float64(stat.CpuCoreTotal),
err = l.svcCtx.Scheduler.AiStorages.SaveClusterResources(adapter.Id, c.Id, c.Name, clusterType, float64(stat.CpuCoreAvail), float64(stat.CpuCoreTotal),
stat.MemAvail, stat.MemTotal, stat.DiskAvail, stat.DiskTotal, float64(stat.GpuAvail), float64(stat.GpuTotal), cardTotal, topsTotal)
if err != nil {
mu.Unlock()