diff --git a/app/app.go b/app/app.go index 911d359ae7..96b9b6d133 100644 --- a/app/app.go +++ b/app/app.go @@ -184,7 +184,6 @@ func New(options ...Option) (outApp *App, outErr error) { }) }) - app.regenerateClientConfig() mlog.Info("Server is initializing...") @@ -207,6 +206,9 @@ func New(options ...Option) (outApp *App, outErr error) { return nil, errors.Wrapf(err, "unable to ensure asymmetric signing key") } + app.EnsureDiagnosticId() + app.regenerateClientConfig() + app.initJobs() app.AddLicenseListener(func() { app.initJobs() diff --git a/cmd/mattermost/commands/server.go b/cmd/mattermost/commands/server.go index 10b44ad83c..9500d5dcb0 100644 --- a/cmd/mattermost/commands/server.go +++ b/cmd/mattermost/commands/server.go @@ -146,8 +146,6 @@ func runServer(configFileLocation string, disableConfigWatch bool, usedPlatform manualtesting.Init(api) } - a.EnsureDiagnosticId() - a.Go(func() { runSecurityJob(a) })