extern/sector-storage: fix GPU usage overwrite bug

This commit is contained in:
Péter Szilágyi 2020-10-28 20:52:33 +02:00
parent 704bef5dfc
commit 5f657b4333
No known key found for this signature in database
GPG Key ID: E9AE538CEDF8293D

View File

@ -27,7 +27,9 @@ func (a *activeResources) withResources(id WorkerID, wr storiface.WorkerResource
} }
func (a *activeResources) add(wr storiface.WorkerResources, r Resources) { func (a *activeResources) add(wr storiface.WorkerResources, r Resources) {
a.gpuUsed = r.CanGPU if r.CanGPU {
a.gpuUsed = true
}
a.cpuUse += r.Threads(wr.CPUs) a.cpuUse += r.Threads(wr.CPUs)
a.memUsedMin += r.MinMemory a.memUsedMin += r.MinMemory
a.memUsedMax += r.MaxMemory a.memUsedMax += r.MaxMemory