fix: Time ILM Actions for scanner info (#17493)

ILM Actions were not timed fix it.
This commit is contained in:
Klaus Post 2023-06-23 07:48:36 -07:00 committed by GitHub
parent f3248a4b37
commit bf8a68879c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -941,7 +941,7 @@ func (i *scannerItem) applyLifecycle(ctx context.Context, o ObjectLayer, oi Obje
console.Debugf(applyActionsLogPrefix+" lifecycle: %q Initial scan: %v\n", i.objectPath(), lcEvt.Action)
}
}
defer globalScannerMetrics.timeILM(lcEvt.Action)
defer globalScannerMetrics.timeILM(lcEvt.Action)()
switch lcEvt.Action {
case lifecycle.DeleteAction, lifecycle.DeleteVersionAction, lifecycle.DeleteRestoredAction, lifecycle.DeleteRestoredVersionAction: