From 7f8f1ad4e3e7b3eb93ec0cf11cf7cb02a947f293 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Sat, 28 Mar 2020 02:57:50 +0100 Subject: [PATCH] fix: cleanup lifecycle unused code (#9219) --- cmd/daily-lifecycle-ops.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/cmd/daily-lifecycle-ops.go b/cmd/daily-lifecycle-ops.go index bf2c17d65..165d3167a 100644 --- a/cmd/daily-lifecycle-ops.go +++ b/cmd/daily-lifecycle-ops.go @@ -44,22 +44,12 @@ func startDailyLifecycle(ctx context.Context, objAPI ObjectLayer) { return case <-time.NewTimer(bgLifecycleInterval).C: // Perform one lifecycle operation - err := lifecycleRound(ctx, objAPI) - switch err.(type) { - case OperationTimedOut: - // Unable to hold a lock means there is another - // caller holding write lock, ignore and try next round. - continue - default: - logger.LogIf(ctx, err) - } + logger.LogIf(ctx, lifecycleRound(ctx, objAPI)) } } } -var lifecycleLockTimeout = newDynamicTimeout(60*time.Second, time.Second) - func lifecycleRound(ctx context.Context, objAPI ObjectLayer) error { buckets, err := objAPI.ListBuckets(ctx) if err != nil {