summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-28 16:39:25 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2017-02-28 16:39:25 -0500
commit5e9adddb6f19a8d18d568871559495ea51b401ae (patch)
treeadb7f82df01611d56f6f31b6e870afd0540a1b71 /cmd
parent5a3bc43668353e41949d2d48c8956eaa9d061860 (diff)
downloadchat-5e9adddb6f19a8d18d568871559495ea51b401ae.tar.gz
chat-5e9adddb6f19a8d18d568871559495ea51b401ae.tar.bz2
chat-5e9adddb6f19a8d18d568871559495ea51b401ae.zip
Reload license from DB for all cluster app servers (#5525)
* Reload license from DB for all cluster app servers * Increase test timeout
Diffstat (limited to 'cmd')
-rw-r--r--cmd/platform/init.go3
-rw-r--r--cmd/platform/license.go4
-rw-r--r--cmd/platform/oldcommands.go4
-rw-r--r--cmd/platform/server.go2
4 files changed, 6 insertions, 7 deletions
diff --git a/cmd/platform/init.go b/cmd/platform/init.go
index eb842d302..cbfdb58ce 100644
--- a/cmd/platform/init.go
+++ b/cmd/platform/init.go
@@ -3,7 +3,6 @@ package main
import (
"fmt"
- "github.com/mattermost/platform/api"
"github.com/mattermost/platform/app"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
@@ -41,6 +40,6 @@ func initDBCommandContext(configFileLocation string) {
app.NewServer()
app.InitStores()
if model.BuildEnterpriseReady == "true" {
- api.LoadLicense()
+ app.LoadLicense()
}
}
diff --git a/cmd/platform/license.go b/cmd/platform/license.go
index 776f62856..dedc4d306 100644
--- a/cmd/platform/license.go
+++ b/cmd/platform/license.go
@@ -6,7 +6,7 @@ import (
"errors"
"io/ioutil"
- "github.com/mattermost/platform/api"
+ "github.com/mattermost/platform/app"
"github.com/spf13/cobra"
)
@@ -40,7 +40,7 @@ func uploadLicenseCmdF(cmd *cobra.Command, args []string) error {
return err
}
- if _, err := api.SaveLicense(fileBytes); err != nil {
+ if _, err := app.SaveLicense(fileBytes); err != nil {
return err
}
diff --git a/cmd/platform/oldcommands.go b/cmd/platform/oldcommands.go
index 15ebb25ba..518dcbaaf 100644
--- a/cmd/platform/oldcommands.go
+++ b/cmd/platform/oldcommands.go
@@ -77,7 +77,7 @@ func doLegacyCommands() {
web.InitWeb()
if model.BuildEnterpriseReady == "true" {
- api.LoadLicense()
+ app.LoadLicense()
}
runCmds()
@@ -1002,7 +1002,7 @@ func cmdUploadLicense() {
flushLogAndExit(1)
}
- if _, err := api.SaveLicense(fileBytes); err != nil {
+ if _, err := app.SaveLicense(fileBytes); err != nil {
l4g.Error("%v", err)
flushLogAndExit(1)
} else {
diff --git a/cmd/platform/server.go b/cmd/platform/server.go
index 00cdb1429..0cb718bcc 100644
--- a/cmd/platform/server.go
+++ b/cmd/platform/server.go
@@ -74,7 +74,7 @@ func runServer(configFileLocation string) {
web.InitWeb()
if model.BuildEnterpriseReady == "true" {
- api.LoadLicense()
+ app.LoadLicense()
}
if !utils.IsLicensed && len(utils.Cfg.SqlSettings.DataSourceReplicas) > 1 {