This commit is contained in:
Łukasz Magiera 2020-11-11 17:39:31 +01:00
parent 09f9f871a3
commit 8ac495723e
3 changed files with 9 additions and 9 deletions

View File

@ -323,8 +323,8 @@ type StorageMinerStruct struct {
ReturnReadPiece func(ctx context.Context, callID storiface.CallID, ok bool, err string) error `perm:"admin" retry:"true"`
ReturnFetch func(ctx context.Context, callID storiface.CallID, err string) error `perm:"admin" retry:"true"`
SealingSchedDiag func(context.Context, bool) (interface{}, error) `perm:"admin"`
SealingAbort func(ctx context.Context, call storiface.CallID) error `perm:"admin"`
SealingSchedDiag func(context.Context, bool) (interface{}, error) `perm:"admin"`
SealingAbort func(ctx context.Context, call storiface.CallID) error `perm:"admin"`
StorageList func(context.Context) (map[stores.ID][]stores.Decl, error) `perm:"admin"`
StorageLocal func(context.Context) (map[stores.ID]string, error) `perm:"admin"`

View File

@ -129,7 +129,7 @@ var sealingJobsCmd = &cli.Command{
Flags: []cli.Flag{
&cli.BoolFlag{Name: "color"},
&cli.BoolFlag{
Name: "show-ret-done",
Name: "show-ret-done",
Usage: "show returned but not consumed calls",
},
},
@ -263,8 +263,8 @@ var sealingSchedDiagCmd = &cli.Command{
}
var sealingAbortCmd = &cli.Command{
Name: "abort",
Usage: "Abort a running job",
Name: "abort",
Usage: "Abort a running job",
ArgsUsage: "[call id]",
Action: func(cctx *cli.Context) error {
if cctx.Args().Len() != 1 {
@ -289,6 +289,7 @@ var sealingAbortCmd = &cli.Command{
for _, workerJobs := range jobs {
for _, j := range workerJobs {
if strings.HasPrefix(j.ID.ID.String(), cctx.Args().First()) {
j := j
job = &j
break outer
}

View File

@ -700,22 +700,21 @@ func (m *Manager) SchedDiag(ctx context.Context, doSched bool) (interface{}, err
}
}
si, err := m.sched.Info(ctx)
si, err := m.sched.Info(ctx)
if err != nil {
return nil, err
}
type SchedInfo interface{}
i := struct{
i := struct {
SchedInfo
ReturnedWork []string
Waiting []string
Waiting []string
CallToWork map[string]string
EarlyRet []string
}{
SchedInfo: si,