[MM-34179] app: move cluster registeration to server creation (#17306)
* app: move cluster registeration to server creation * initserver via fakeapp * reflect review comments
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
756f5fbff3
Коммит
e13d85d8c7
@@ -235,9 +235,9 @@ func (a *App) TestEmail(userID string, cfg *model.Config) *model.AppError {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ServerBusyStateChanged is called when a CLUSTER_EVENT_BUSY_STATE_CHANGED is received.
|
||||
func (a *App) ServerBusyStateChanged(sbs *model.ServerBusyState) {
|
||||
a.Srv().Busy.ClusterEventChanged(sbs)
|
||||
// serverBusyStateChanged is called when a CLUSTER_EVENT_BUSY_STATE_CHANGED is received.
|
||||
func (s *Server) serverBusyStateChanged(sbs *model.ServerBusyState) {
|
||||
s.Busy.ClusterEventChanged(sbs)
|
||||
if sbs.Busy {
|
||||
mlog.Warn("server busy state activitated via cluster event - non-critical services disabled", mlog.Int64("expires_sec", sbs.Expires))
|
||||
} else {
|
||||
|
||||
Ссылка в новой задаче
Block a user