start the job scheduler separately to the worker pools

This commit is contained in:
kim
2024-04-24 13:39:10 +01:00
parent 092c9819b2
commit f94c201e94
2 changed files with 18 additions and 5 deletions

View File

@ -57,14 +57,16 @@ type Workers struct {
_ nocopy
}
// Start will start all of the contained
// worker pools (and global scheduler).
// StartScheduler starts the job scheduler.
func (w *Workers) StartScheduler() {
tryUntil("starting scheduler", 5, w.Scheduler.Start)
}
// Start will start contained worker pools.
func (w *Workers) Start() {
// Get currently set GOMAXPROCS.
maxprocs := runtime.GOMAXPROCS(0)
tryUntil("starting scheduler", 5, w.Scheduler.Start)
tryUntil("start delivery workerpool", 5, func() bool {
n := config.GetAdvancedSenderMultiplier()
if n < 1 {