Browse Source

Merge pull request #137 from mutantmonkey/issue_136

Fix -nologs on linx-cleanup tool (closes #136)
pull/141/head v1.2.8
Andrei Marcu 7 years ago
committed by GitHub
parent
commit
4fa6423a85
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      linx-cleanup/cleanup.go

4
linx-cleanup/cleanup.go

@ -34,11 +34,15 @@ func main() {
for _, filename := range files { for _, filename := range files {
metadata, err := metaBackend.Get(filename) metadata, err := metaBackend.Get(filename)
if err != nil { if err != nil {
if !noLogs {
log.Printf("Failed to find metadata for %s", filename) log.Printf("Failed to find metadata for %s", filename)
} }
}
if expiry.IsTsExpired(metadata.Expiry) { if expiry.IsTsExpired(metadata.Expiry) {
if !noLogs {
log.Printf("Delete %s", filename) log.Printf("Delete %s", filename)
}
fileBackend.Delete(filename) fileBackend.Delete(filename)
metaStorageBackend.Delete(filename) metaStorageBackend.Delete(filename)
} }

Loading…
Cancel
Save