Cleanup and make a safer code (#5794)

This commit is contained in:
Harshavardhana
2018-04-21 20:51:53 -07:00
committed by kannappanr
parent 76cc65531c
commit 954142a98f
5 changed files with 27 additions and 18 deletions
-7
View File
@@ -17,7 +17,6 @@
package cmd
import (
"context"
"time"
)
@@ -66,9 +65,3 @@ type OpsLockState struct {
Status statusType `json:"status"` // Status can be Running/Ready/Blocked.
Since time.Time `json:"since"` // Time when the lock was initially held.
}
// listLocksInfo - Fetches locks held on bucket, matching prefix held for longer than duration.
func listLocksInfo(bucket, prefix string, duration time.Duration) []VolumeLockInfo {
locksInfo, _ := newObjectLayerFn().ListLocks(context.Background(), bucket, prefix, duration)
return locksInfo
}