Move resource locale initial load to boot proc
This commit is contained in:
parent
a50c64747e
commit
75c5efb520
@ -351,6 +351,11 @@ func (app *CortezaApp) InitServices(ctx context.Context) (err error) {
|
||||
rbac.SetGlobal(ac)
|
||||
}
|
||||
|
||||
locale.Global().BindStore(app.Store)
|
||||
if err = locale.Global().ReloadResourceTranslations(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if app.Opt.Messagebus.Enabled {
|
||||
// initialize all the queue handlers
|
||||
messagebus.Service().Init(ctx, app.Store)
|
||||
|
||||
@ -10,7 +10,6 @@ import (
|
||||
"github.com/cortezaproject/corteza-server/pkg/eventbus"
|
||||
"github.com/cortezaproject/corteza-server/pkg/healthcheck"
|
||||
"github.com/cortezaproject/corteza-server/pkg/id"
|
||||
"github.com/cortezaproject/corteza-server/pkg/locale"
|
||||
"github.com/cortezaproject/corteza-server/pkg/logger"
|
||||
"github.com/cortezaproject/corteza-server/pkg/objstore"
|
||||
"github.com/cortezaproject/corteza-server/pkg/objstore/minio"
|
||||
@ -183,11 +182,6 @@ func Initialize(ctx context.Context, log *zap.Logger, s store.Storer, ws websock
|
||||
return err
|
||||
}
|
||||
|
||||
locale.Global().BindStore(DefaultStore)
|
||||
if err = locale.Global().ReloadResourceTranslations(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
automationService.DefaultUser = DefaultUser
|
||||
|
||||
automationService.Registry().AddTypes(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user