From fb6d68ca8320d6613c5d23cf60664995d7d6abb2 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 18 Oct 2024 11:39:44 +0300 Subject: more TODO ideas etc --- internal/queue/queue.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'internal/queue/queue.go') diff --git a/internal/queue/queue.go b/internal/queue/queue.go index 0724f7b..9cc22d8 100644 --- a/internal/queue/queue.go +++ b/internal/queue/queue.go @@ -81,12 +81,15 @@ func queuePlatforms(args config.Args) error { if args.DryRun { continue } - archivePath := filepath.Join(args.GosDir, "db", "archive", filepath.Base(filePath)) - log.Printf("Archiving %s -> %s", filePath, archivePath) - if err := oi.EnsureParentDir(archivePath); err != nil { + + // Keep queued items in trash for a while. + // TODO: clean up files older than 3 months from there + trashPath := filepath.Join(args.GosDir, "db", "trashbin", filepath.Base(filePath)) + log.Printf("Trashing %s -> %s", filePath, trashPath) + if err := oi.EnsureParentDir(trashPath); err != nil { return err } - if err := os.Rename(filePath, archivePath); err != nil { + if err := os.Rename(filePath, trashPath); err != nil { return err } } -- cgit v1.2.3