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:
Harshavardhana
2024-07-03 00:16:05 -07:00
committed by GitHub
parent b6d4a77b94
commit 32d04091a2
7 changed files with 389 additions and 323 deletions

View File

@@ -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)