Fix -nologs on linx-cleanup tool (closes #136)

This commit is contained in:
mutantmonkey 2018-02-25 14:46:20 -08:00
parent e86f19ecb1
commit c015b5f1da
1 changed files with 6 additions and 2 deletions

View File

@ -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 {
log.Printf("Failed to find metadata for %s", filename) if !noLogs {
log.Printf("Failed to find metadata for %s", filename)
}
} }
if expiry.IsTsExpired(metadata.Expiry) { if expiry.IsTsExpired(metadata.Expiry) {
log.Printf("Delete %s", filename) if !noLogs {
log.Printf("Delete %s", filename)
}
fileBackend.Delete(filename) fileBackend.Delete(filename)
metaStorageBackend.Delete(filename) metaStorageBackend.Delete(filename)
} }