Hide ret-done tasks in sealing jobs by default

This commit is contained in:
Łukasz Magiera 2020-11-11 16:48:04 +01:00
parent bd71bf2379
commit 2a3d930933

View File

@ -127,6 +127,10 @@ var sealingJobsCmd = &cli.Command{
Usage: "list workers", Usage: "list workers",
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.BoolFlag{Name: "color"}, &cli.BoolFlag{Name: "color"},
&cli.BoolFlag{
Name: "show-ret-done",
Usage: "show returned but not consumed calls",
},
}, },
Action: func(cctx *cli.Context) error { Action: func(cctx *cli.Context) error {
color.NoColor = !cctx.Bool("color") color.NoColor = !cctx.Bool("color")
@ -191,6 +195,9 @@ var sealingJobsCmd = &cli.Command{
case l.RunWait > 0: case l.RunWait > 0:
state = fmt.Sprintf("assigned(%d)", l.RunWait-1) state = fmt.Sprintf("assigned(%d)", l.RunWait-1)
case l.RunWait == storiface.RWRetDone: case l.RunWait == storiface.RWRetDone:
if !cctx.Bool("show-ret-done") {
continue
}
state = "ret-done" state = "ret-done"
case l.RunWait == storiface.RWReturned: case l.RunWait == storiface.RWReturned:
state = "returned" state = "returned"