Move wg increment inside goroutines. Make GC calls less aggressive

This commit is contained in:
2026-01-27 17:25:29 +01:00
parent 55cb2cb6d6
commit bbde91a1f9
4 changed files with 44 additions and 48 deletions

View File

@@ -49,6 +49,7 @@ func CleanUp(wg *sync.WaitGroup, ctx context.Context) {
// runWorker takes simple values to configure what it does
func cleanUpWorker(wg *sync.WaitGroup, ctx context.Context, interval string, mode string, cleanupDir string, delete bool) {
wg.Add(1)
go func() {
defer wg.Done()