From 0e17babdd3175b3876c42adbac1df4c51f4f9a12 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Tue, 3 Jul 2018 16:54:59 +0100 Subject: Make sure diagnostic ID is loaded before client config. (#9032) --- app/app.go | 4 +++- cmd/mattermost/commands/server.go | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/app.go b/app/app.go index 911d359ae..96b9b6d13 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 10b44ad83..9500d5dcb 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) }) -- cgit v1.2.3-1-g7c22