diff options
Diffstat (limited to 'cmd/platform')
-rw-r--r-- | cmd/platform/init.go | 2 | ||||
-rw-r--r-- | cmd/platform/server.go | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cmd/platform/init.go b/cmd/platform/init.go index 1683c9d49..2f41b2ad6 100644 --- a/cmd/platform/init.go +++ b/cmd/platform/init.go @@ -29,7 +29,7 @@ func initDBCommandContext(configFileLocation string) (*app.App, error) { utils.ConfigureCmdLineLog() - a := app.Global() + a := app.New() a.NewServer() a.InitStores() if model.BuildEnterpriseReady == "true" { diff --git a/cmd/platform/server.go b/cmd/platform/server.go index ec753c837..7ee7097e7 100644 --- a/cmd/platform/server.go +++ b/cmd/platform/server.go @@ -64,7 +64,9 @@ func runServer(configFileLocation string) { l4g.Error("Problem with file storage settings: " + err.Error()) } - a := app.Global() + a := app.New() + defer a.Shutdown() + a.NewServer() a.InitStores() a.Srv.Router = api.NewRouter() @@ -161,8 +163,6 @@ func runServer(configFileLocation string) { a.Jobs.StopSchedulers() a.Jobs.StopWorkers() - - a.StopServer() } func runSecurityJob(a *app.App) { |