try test with usage always blocking on calc

This commit is contained in:
Samir Patel 2021-05-27 14:05:59 -05:00 • committed by Samir Patel
parent 108da005b7
commit 63300db1bd

8
api.go
View file

@ -949,10 +949,10 @@ func (api *API) Usage(ctx context.Context, remote bool) (map[string]NodeUsage, e
api.usageCache.muRead.Lock()
defer api.usageCache.muRead.Unlock()
var t time.Time
if api.usageCache.lastUpdated == t {
api.calculateUsage()
}
// var t time.Time
// if api.usageCache.lastUpdated == t {
api.calculateUsage()
// }
if !remote {
api.requestUsageOfNodes()