Remove error handling for recordUsage

This commit is contained in:
ionutboangiu
2021-07-28 17:11:44 +03:00
committed by Dan Christian Bogos
parent ad16339c04
commit e6d7a71aa7

View File

@@ -357,9 +357,7 @@ func (rs Resources) allocateResource(ru *ResourceUsage, dryRun bool) (alcMessage
if dryRun {
return
}
if err = rs.recordUsage(ru); err != nil {
return utils.EmptyString, err
}
rs.recordUsage(ru) // recordUsage returns error only when ru.ID already exists in the Usages map
return
}