mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #13651 from rainzm/scheduler/init
fix(scheduler): init db after init auth
This commit is contained in:
@@ -80,16 +80,16 @@ func StartService() error {
|
||||
count++
|
||||
}
|
||||
|
||||
if err := computemodels.InitDB(); err != nil {
|
||||
log.Fatalf("InitDB fail: %s", err)
|
||||
}
|
||||
|
||||
commonOpts := &opts.CommonOptions
|
||||
app_common.InitAuth(commonOpts, func() {
|
||||
log.Infof("Auth complete!!")
|
||||
startSched()
|
||||
})
|
||||
|
||||
if err := computemodels.InitDB(); err != nil {
|
||||
log.Fatalf("InitDB fail: %s", err)
|
||||
}
|
||||
|
||||
common_options.StartOptionManager(&opts, opts.ConfigSyncPeriodSeconds, compute_api.SERVICE_TYPE, compute_api.SERVICE_VERSION, o.OnOptionsChange)
|
||||
|
||||
app := app_common.InitApp(&opts.BaseOptions, true)
|
||||
|
||||
Reference in New Issue
Block a user