@@ -272,16 +272,16 @@ func (r *Runner) Run(ctx context.Context) error {
272272 }
273273 }
274274
275- err = r .parseConfiguration (ctx )
275+ err = r .parsePluginsConfiguration (ctx )
276276 if err != nil {
277- setupLog .Error (err , "Failed to parse the configuration" )
277+ setupLog .Error (err , "Failed to parse plugins configuration" )
278278 return err
279279 }
280280
281281 // --- Initialize Core EPP Components ---
282- scheduler := r . initializeScheduler ( )
282+ scheduler := scheduling . NewSchedulerWithConfig ( r . schedulerConfig )
283283
284- saturationDetector := saturationdetector .NewDetector (sdConfig , datastore , ctrl . Log )
284+ saturationDetector := saturationdetector .NewDetector (sdConfig , datastore , setupLog )
285285
286286 director := requestcontrol .NewDirectorWithConfig (datastore , scheduler , saturationDetector , r .requestControlConfig )
287287
@@ -326,16 +326,7 @@ func (r *Runner) Run(ctx context.Context) error {
326326 return nil
327327}
328328
329- func (r * Runner ) initializeScheduler () * scheduling.Scheduler {
330- if r .schedulerConfig != nil {
331- return scheduling .NewSchedulerWithConfig (r .schedulerConfig )
332- }
333-
334- // otherwise, no one configured from outside scheduler config. use existing configuration
335- return scheduling .NewScheduler ()
336- }
337-
338- func (r * Runner ) parseConfiguration (ctx context.Context ) error {
329+ func (r * Runner ) parsePluginsConfiguration (ctx context.Context ) error {
339330 if * configText == "" && * configFile == "" {
340331 return nil // configuring through code, not through file
341332 }
0 commit comments