Remove newScheduler to simplify instantiation

Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
kerthcet
2022-10-10 10:25:37 +08:00
parent a4ad8f4154
commit 127178661d
4 changed files with 86 additions and 132 deletions

View File

@@ -460,17 +460,14 @@ func initScheduler(stop <-chan struct{}, cache internalcache.Cache, queue intern
return nil, nil, err
}
s := newScheduler(
cache,
nil,
nil,
stop,
queue,
profile.Map{testSchedulerName: fwk},
client,
nil,
0,
)
s := &Scheduler{
Cache: cache,
client: client,
StopEverything: stop,
SchedulingQueue: queue,
Profiles: profile.Map{testSchedulerName: fwk},
}
s.applyDefaultHandlers()
return s, fwk, nil
}