fix: add hidden flag to return count number of locks (#3552)
This commit is contained in:
@@ -33,6 +33,12 @@ var topLocksFlag = []cli.Flag{
|
||||
Name: "stale",
|
||||
Usage: "list stale locks",
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "count",
|
||||
Usage: "number of top locks",
|
||||
Hidden: true,
|
||||
Value: 10,
|
||||
},
|
||||
}
|
||||
|
||||
var adminTopLocksCmd = cli.Command{
|
||||
@@ -123,7 +129,7 @@ func mainAdminTopLocks(ctx *cli.Context) error {
|
||||
|
||||
// Call top locks API
|
||||
entries, e := client.TopLocksWithOpts(globalContext, madmin.TopLockOpts{
|
||||
Count: 10,
|
||||
Count: ctx.Int("count"),
|
||||
Stale: ctx.Bool("stale"),
|
||||
})
|
||||
fatalIf(probe.NewError(e), "Unable to get server locks list.")
|
||||
|
||||
Reference in New Issue
Block a user