Skip to content

Commit 1d7edf9

Browse files
committed
fix init map
1 parent 74ebf43 commit 1d7edf9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/scheduler/scheduler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func SchedulerReady(cfg *types.SchedulerConfig, ssClient *scoreserver.Client, vm
4343
func InitSchedulerInfo(cfg *types.SchedulerConfig, lg *zap.Logger) (map[string]*types.ProblemInstance, []types.ZonePriority) {
4444
lg.Info("Scheduler: Init SchedulerInfo")
4545
var pis map[string]*types.ProblemInstance
46+
pis = map[string]*types.ProblemInstance{}
4647
//Init pis
4748
for _, p := range cfg.Setting.Problems {
4849
pis[p.Name] = &types.ProblemInstance{MachineImageName: "", ProblemID: "", NotReady: 0, Ready: 0, UnderChallenge: 0, UnderScoring: 0, Abandoned: 0, KeepPool: p.KeepPool, KIS: []types.KeepInstance{}, CurrentInstance: 0, DefaultInstance: p.DefaultInstance}

0 commit comments

Comments
 (0)