sched: Print worker UUIDs in shed-diag correctly

This commit is contained in:
Łukasz Magiera 2020-10-30 18:32:16 +01:00
parent 774e2ecebf
commit f90a387f96

View File

@ -7,6 +7,7 @@ import (
"sync" "sync"
"time" "time"
"github.com/google/uuid"
"golang.org/x/xerrors" "golang.org/x/xerrors"
"github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/abi"
@ -217,7 +218,7 @@ type SchedDiagRequestInfo struct {
type SchedDiagInfo struct { type SchedDiagInfo struct {
Requests []SchedDiagRequestInfo Requests []SchedDiagRequestInfo
OpenWindows []WorkerID OpenWindows []string
} }
func (sh *scheduler) runSched() { func (sh *scheduler) runSched() {
@ -324,7 +325,7 @@ func (sh *scheduler) diag() SchedDiagInfo {
defer sh.workersLk.RUnlock() defer sh.workersLk.RUnlock()
for _, window := range sh.openWindows { for _, window := range sh.openWindows {
out.OpenWindows = append(out.OpenWindows, window.worker) out.OpenWindows = append(out.OpenWindows, uuid.UUID(window.worker).String())
} }
return out return out