ResourceS - dryRun should not clean allocations

This commit is contained in:
DanB
2019-04-14 20:31:52 +02:00
parent 81b03d9ce7
commit 38d9bbff0f

View File

@@ -260,7 +260,7 @@ func (rs Resources) allocateResource(ru *ResourceUsage, dryRun bool) (alcMessage
// Simulate resource usage
for _, r := range rs {
r.removeExpiredUnits()
if _, hasID := r.Usages[ru.ID]; hasID { // update
if _, hasID := r.Usages[ru.ID]; hasID && !dryRun { // update
r.clearUsage(ru.ID)
}
if r.rPrf == nil {