mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-29 18:27:58 +08:00
perf: sorted team by memory (#1571)
This commit is contained in:
parent
0b4618a75f
commit
d950870433
@ -124,7 +124,12 @@ func (t *TenantAction) BindTenantsResource(source []*dbmodel.Tenants) api_model.
|
||||
}
|
||||
list.Add(item)
|
||||
}
|
||||
sort.Sort(list)
|
||||
sort.SliceStable(list, func(i, j int) bool {
|
||||
if list[i].MemoryRequest > list[j].MemoryRequest {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
return list
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user