Give up on handling error returned by clearUsage() from allocateResource func in resources.go

This commit is contained in:
ionutboangiu
2021-05-10 17:24:43 +03:00
committed by Dan Christian Bogos
parent b9e328bf32
commit ec910ea1a7

View File

@@ -290,9 +290,7 @@ func (rs Resources) allocateResource(ru *ResourceUsage, dryRun bool) (alcMessage
for _, r := range rs {
r.removeExpiredUnits()
if _, hasID := r.Usages[ru.ID]; hasID && !dryRun { // update
if err = r.clearUsage(ru.ID); err != nil {
return
}
r.clearUsage(ru.ID)
}
if r.rPrf == nil {
err = fmt.Errorf("empty configuration for resourceID: %s", r.TenantID())