From 44c996bccde95c51409d0d768ab38778033deeb4 Mon Sep 17 00:00:00 2001 From: Seb3thehacker <88462253+Seb3thehacker@users.noreply.github.com> Date: Thu, 24 Mar 2022 08:17:54 +0000 Subject: [PATCH] Update cleanup.go --- cleanup/cleanup.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/cleanup/cleanup.go b/cleanup/cleanup.go index 97789d5..6230b00 100644 --- a/cleanup/cleanup.go +++ b/cleanup/cleanup.go @@ -17,15 +17,6 @@ func Cleanup(filesDir string, metaDir string, locksDir string, noLogs bool) { } for _, filename := range files { - locked, err := fileBackend.CheckLock(filename) - if err != nil { - log.Printf("Error checking if %s is locked: %s", filename, err) - } - if locked { - log.Printf("%s is locked, it will be ignored", filename) - continue - } - metadata, err := fileBackend.Head(filename) if err != nil { if !noLogs { @@ -45,9 +36,7 @@ func Cleanup(filesDir string, metaDir string, locksDir string, noLogs bool) { func PeriodicCleanup(minutes time.Duration, filesDir string, metaDir string, locksDir string, noLogs bool) { c := time.Tick(minutes) for range c { - log.Printf("Running periodic cleanup") Cleanup(filesDir, metaDir, locksDir, noLogs) - log.Printf("Finished periodic cleanup") } }