MM-8607: Add ability to turn off non-critical services when under load; cluster support (#13267)

* MM-8607: Add cluster support for server busy status

MM-8607: Busy.Cluster should be non-exported

MM-8607: rename logging field seconds -> expires_sec

MM-8607: each node clears its own busy flag

MM-8607: ensure unit tests are not sensitive to test machine speed

* MM-8607: chg comment to force CI rebuild
Этот коммит содержится в:
Doug Lauder
2019-12-03 12:56:40 -05:00
коммит произвёл Jesús Espino
родитель 4ebc71ed38
Коммит 420c411595
8 изменённых файлов: 173 добавлений и 30 удалений

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

@@ -492,12 +492,5 @@ func getServerBusyExpires(c *Context, w http.ResponseWriter, r *http.Request) {
c.SetPermissionError(model.PERMISSION_MANAGE_SYSTEM)
return
}
busy := c.App.Srv.Busy
sbs := &model.ServerBusyState{
Busy: busy.IsBusy(),
Expires: busy.Expires().Unix(),
Expires_ts: busy.Expires().UTC().Format("Mon Jan 2 15:04:05 -0700 MST 2006"),
}
w.Write([]byte(sbs.ToJson()))
w.Write([]byte(c.App.Srv.Busy.ToJson()))
}