Require core scheduler
This commit is contained in:
parent
bef4a8ee09
commit
55e4f5cdc4
|
@ -1193,6 +1193,18 @@ func (s *Server) setupWorkers() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Check if the core scheduler is not enabled
|
||||
found := false
|
||||
for _, scheduler := range s.config.EnabledSchedulers {
|
||||
if scheduler == structs.JobTypeCore {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
panic(fmt.Sprintf("invalid configuration: %q scheduler not enabled", structs.JobTypeCore))
|
||||
}
|
||||
|
||||
// Start the workers
|
||||
for i := 0; i < s.config.NumSchedulers; i++ {
|
||||
if w, err := NewWorker(s); err != nil {
|
||||
|
|
Loading…
Reference in New Issue