Move cluster, webhub and store out of Server (#20899)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2022-10-06 11:04:21 +03:00
коммит произвёл GitHub
родитель 203df2f537
Коммит 5e69c6b02f
222 изменённых файлов: 9093 добавлений и 7710 удалений

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

@@ -640,7 +640,7 @@ func setServerBusy(c *Context, w http.ResponseWriter, r *http.Request) {
defer c.LogAuditRec(auditRec)
auditRec.AddEventParameter("seconds", i)
c.App.Srv().Busy.Set(time.Second * time.Duration(i))
c.App.Srv().Platform().Busy.Set(time.Second * time.Duration(i))
mlog.Warn("server busy state activated - non-critical services disabled", mlog.Int64("seconds", i))
auditRec.Success()
@@ -656,7 +656,7 @@ func clearServerBusy(c *Context, w http.ResponseWriter, r *http.Request) {
auditRec := c.MakeAuditRecord("clearServerBusy", audit.Fail)
defer c.LogAuditRec(auditRec)
c.App.Srv().Busy.Clear()
c.App.Srv().Platform().Busy.Clear()
mlog.Info("server busy state cleared - non-critical services enabled")
auditRec.Success()
@@ -671,7 +671,7 @@ func getServerBusyExpires(c *Context, w http.ResponseWriter, r *http.Request) {
// We call to ToJSON because it actually returns a different struct
// along with doing some computations.
sbsJSON, jsonErr := c.App.Srv().Busy.ToJSON()
sbsJSON, jsonErr := c.App.Srv().Platform().Busy.ToJSON()
if jsonErr != nil {
mlog.Warn(jsonErr.Error())
}