Merge branch 'master' into advanced-permissions-phase-1
Этот коммит содержится в:
@@ -21,6 +21,9 @@ import (
|
||||
_ "github.com/go-ldap/ldap"
|
||||
_ "github.com/hashicorp/memberlist"
|
||||
_ "github.com/mattermost/rsc/qr"
|
||||
_ "github.com/prometheus/client_golang/prometheus"
|
||||
_ "github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
_ "github.com/tylerb/graceful"
|
||||
_ "gopkg.in/olivere/elastic.v5"
|
||||
)
|
||||
|
||||
|
||||
@@ -346,22 +346,22 @@ func createUser(idx int, teamMemberships int, channelMemberships int, teamsAndCh
|
||||
}
|
||||
|
||||
useMilitaryTime := "false"
|
||||
if rand.Intn(2) == 0 {
|
||||
if idx != 0 && rand.Intn(2) == 0 {
|
||||
useMilitaryTime = "true"
|
||||
}
|
||||
|
||||
collapsePreviews := "false"
|
||||
if rand.Intn(2) == 0 {
|
||||
if idx != 0 && rand.Intn(2) == 0 {
|
||||
collapsePreviews = "true"
|
||||
}
|
||||
|
||||
messageDisplay := "clean"
|
||||
if rand.Intn(2) == 0 {
|
||||
if idx != 0 && rand.Intn(2) == 0 {
|
||||
messageDisplay = "compact"
|
||||
}
|
||||
|
||||
channelDisplayMode := "full"
|
||||
if rand.Intn(2) == 0 {
|
||||
if idx != 0 && rand.Intn(2) == 0 {
|
||||
channelDisplayMode = "centered"
|
||||
}
|
||||
|
||||
|
||||
@@ -28,9 +28,10 @@ const (
|
||||
var MaxNotificationsPerChannelDefault int64 = 1000000
|
||||
|
||||
var serverCmd = &cobra.Command{
|
||||
Use: "server",
|
||||
Short: "Run the Mattermost server",
|
||||
RunE: runServerCmd,
|
||||
Use: "server",
|
||||
Short: "Run the Mattermost server",
|
||||
RunE: runServerCmd,
|
||||
SilenceUsage: true,
|
||||
}
|
||||
|
||||
func runServerCmd(cmd *cobra.Command, args []string) error {
|
||||
@@ -41,11 +42,10 @@ func runServerCmd(cmd *cobra.Command, args []string) error {
|
||||
|
||||
disableConfigWatch, _ := cmd.Flags().GetBool("disableconfigwatch")
|
||||
|
||||
runServer(config, disableConfigWatch)
|
||||
return nil
|
||||
return runServer(config, disableConfigWatch)
|
||||
}
|
||||
|
||||
func runServer(configFileLocation string, disableConfigWatch bool) {
|
||||
func runServer(configFileLocation string, disableConfigWatch bool) error {
|
||||
options := []app.Option{app.ConfigFile(configFileLocation)}
|
||||
if disableConfigWatch {
|
||||
options = append(options, app.DisableConfigWatch)
|
||||
@@ -54,7 +54,7 @@ func runServer(configFileLocation string, disableConfigWatch bool) {
|
||||
a, err := app.New(options...)
|
||||
if err != nil {
|
||||
l4g.Error(err.Error())
|
||||
return
|
||||
return err
|
||||
}
|
||||
defer a.Shutdown()
|
||||
|
||||
@@ -174,6 +174,8 @@ func runServer(configFileLocation string, disableConfigWatch bool) {
|
||||
|
||||
a.Jobs.StopSchedulers()
|
||||
a.Jobs.StopWorkers()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func runSecurityJob(a *app.App) {
|
||||
|
||||
Ссылка в новой задаче
Block a user