resume any batch jobs in a goroutine (#20035)
Bonus: move batch job initialization to the last item after all other initialization,
allowing for faster startup time for different subsystems.
This commit is contained in:
@@ -1030,11 +1030,6 @@ func serverMain(ctx *cli.Context) {
|
||||
globalTransitionState.Init(newObject)
|
||||
})
|
||||
|
||||
// Initialize batch job pool.
|
||||
bootstrapTrace("newBatchJobPool", func() {
|
||||
globalBatchJobPool = newBatchJobPool(GlobalContext, newObject, 100)
|
||||
})
|
||||
|
||||
// Initialize the license update job
|
||||
bootstrapTrace("initLicenseUpdateJob", func() {
|
||||
initLicenseUpdateJob(GlobalContext, newObject)
|
||||
@@ -1104,6 +1099,11 @@ func serverMain(ctx *cli.Context) {
|
||||
})
|
||||
}
|
||||
|
||||
// Initialize batch job pool.
|
||||
bootstrapTrace("newBatchJobPool", func() {
|
||||
globalBatchJobPool = newBatchJobPool(GlobalContext, newObject, 100)
|
||||
})
|
||||
|
||||
// Prints the formatted startup message, if err is not nil then it prints additional information as well.
|
||||
printStartupMessage(getAPIEndpoints(), err)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user