Этот коммит содержится в:
Chris
2017-09-19 18:31:35 -05:00
коммит произвёл GitHub
родитель 7e4ff6adcc
Коммит ac74066f0e
43 изменённых файлов: 259 добавлений и 262 удалений

Просмотреть файл

@@ -9,6 +9,7 @@ import (
l4g "github.com/alecthomas/log4go"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/utils"
)
const (
@@ -75,3 +76,11 @@ func (me *ClusterDiscoveryService) Start() {
func (me *ClusterDiscoveryService) Stop() {
me.stop <- true
}
func (a *App) IsLeader() bool {
if utils.IsLicensed() && *utils.Cfg.ClusterSettings.Enable && a.Cluster != nil {
return a.Cluster.IsLeader()
} else {
return true
}
}