0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00

fix(metrics): update storage metrics on gc (#2698)

Signed-off-by: Eusebiu Petu <petu.eusebiu@gmail.com>
This commit is contained in:
peusebiu 2024-10-03 21:26:22 +03:00 committed by GitHub
parent d42ac4cd0d
commit cfbeeff7bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1634,6 +1634,11 @@ func (is *ImageStore) CleanupRepo(repo string, blobs []godigest.Digest, removeRe
} }
} }
// finally update metrics
if is.storeDriver.Name() == storageConstants.LocalStorageDriverName {
monitoring.SetStorageUsage(is.metrics, is.rootDir, repo)
}
return count, nil return count, nil
} }