Sfoglia il codice sorgente

fix:Remove duplicate code (#2686)

Tim Xiao 2 anni fa
parent
commit
944193ce25
1 ha cambiato i file con 1 aggiunte e 6 eliminazioni
  1. 1 6
      core/stat/internal/cpu_linux.go

+ 1 - 6
core/stat/internal/cpu_linux.go

@@ -33,13 +33,8 @@ func initialize() {
 	}
 	}
 
 
 	cores = uint64(len(cpus))
 	cores = uint64(len(cpus))
-	sets, err := cpuSets()
-	if err != nil {
-		logx.Error(err)
-		return
-	}
+	quota = float64(len(cpus))
 
 
-	quota = float64(len(sets))
 	cq, err := cpuQuota()
 	cq, err := cpuQuota()
 	if err == nil {
 	if err == nil {
 		if cq != -1 {
 		if cq != -1 {