fix deletiontime from event
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -438,21 +438,27 @@ func (c *CronTask) applyInventoryDeletions(ctx context.Context, agg map[dailyAgg
|
||||
}
|
||||
}
|
||||
for k, v := range agg {
|
||||
if v.deletion != 0 || k.Vcenter != vcenter {
|
||||
if k.Vcenter != vcenter {
|
||||
continue
|
||||
}
|
||||
if ts, ok := byID[k.VmId]; ok {
|
||||
v.deletion = ts
|
||||
if v.deletion != ts {
|
||||
v.deletion = ts
|
||||
}
|
||||
totalApplied++
|
||||
continue
|
||||
}
|
||||
if ts, ok := byUUID[k.VmUuid]; ok {
|
||||
v.deletion = ts
|
||||
if v.deletion != ts {
|
||||
v.deletion = ts
|
||||
}
|
||||
totalApplied++
|
||||
continue
|
||||
}
|
||||
if ts, ok := byName[strings.ToLower(k.Name)]; ok {
|
||||
v.deletion = ts
|
||||
if v.deletion != ts {
|
||||
v.deletion = ts
|
||||
}
|
||||
totalApplied++
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user