mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Add reason as comment for ignoring returned error in allocateResource
This commit is contained in:
committed by
Dan Christian Bogos
parent
1db592ea8d
commit
7e7a1ded59
@@ -289,7 +289,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
|
||||
r.clearUsage(ru.ID)
|
||||
r.clearUsage(ru.ID) // clearUsage returns error only when ru.ID does not exist in the Usages map
|
||||
}
|
||||
if r.rPrf == nil {
|
||||
err = fmt.Errorf("empty configuration for resourceID: %s", r.TenantID())
|
||||
|
||||
Reference in New Issue
Block a user