коммит произвёл
GitHub
родитель
39c3b8ebf9
Коммит
78a9927b67
@@ -25,7 +25,7 @@ func localCheckIntegrity(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
defer c.LogAuditRec(auditRec)
|
defer c.LogAuditRec(auditRec)
|
||||||
|
|
||||||
var results []model.IntegrityCheckResult
|
var results []model.IntegrityCheckResult
|
||||||
resultsChan := c.App.Srv().Store.CheckIntegrity()
|
resultsChan := c.App.CheckIntegrity()
|
||||||
for result := range resultsChan {
|
for result := range resultsChan {
|
||||||
results = append(results, result)
|
results = append(results, result)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -575,6 +575,10 @@ func (a *App) dbHealthCheckKey() string {
|
|||||||
return fmt.Sprintf("health_check_%s", a.GetClusterId())
|
return fmt.Sprintf("health_check_%s", a.GetClusterId())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *App) CheckIntegrity() <-chan model.IntegrityCheckResult {
|
||||||
|
return a.Srv().Store.CheckIntegrity()
|
||||||
|
}
|
||||||
|
|
||||||
func (a *App) SetServer(srv *Server) {
|
func (a *App) SetServer(srv *Server) {
|
||||||
a.srv = srv
|
a.srv = srv
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -429,6 +429,7 @@ type AppIface interface {
|
|||||||
CheckAndSendUserLimitWarningEmails(c *request.Context) *model.AppError
|
CheckAndSendUserLimitWarningEmails(c *request.Context) *model.AppError
|
||||||
CheckCanInviteToSharedChannel(channelId string) error
|
CheckCanInviteToSharedChannel(channelId string) error
|
||||||
CheckForClientSideCert(r *http.Request) (string, string, string)
|
CheckForClientSideCert(r *http.Request) (string, string, string)
|
||||||
|
CheckIntegrity() <-chan model.IntegrityCheckResult
|
||||||
CheckMandatoryS3Fields(settings *model.FileSettings) *model.AppError
|
CheckMandatoryS3Fields(settings *model.FileSettings) *model.AppError
|
||||||
CheckPasswordAndAllCriteria(user *model.User, password string, mfaToken string) *model.AppError
|
CheckPasswordAndAllCriteria(user *model.User, password string, mfaToken string) *model.AppError
|
||||||
CheckRolesExist(roleNames []string) *model.AppError
|
CheckRolesExist(roleNames []string) *model.AppError
|
||||||
|
|||||||
@@ -1151,6 +1151,23 @@ func (a *OpenTracingAppLayer) CheckForClientSideCert(r *http.Request) (string, s
|
|||||||
return resultVar0, resultVar1, resultVar2
|
return resultVar0, resultVar1, resultVar2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *OpenTracingAppLayer) CheckIntegrity() <-chan model.IntegrityCheckResult {
|
||||||
|
origCtx := a.ctx
|
||||||
|
span, newCtx := tracing.StartSpanWithParentByContext(a.ctx, "app.CheckIntegrity")
|
||||||
|
|
||||||
|
a.ctx = newCtx
|
||||||
|
a.app.Srv().Store.SetContext(newCtx)
|
||||||
|
defer func() {
|
||||||
|
a.app.Srv().Store.SetContext(origCtx)
|
||||||
|
a.ctx = origCtx
|
||||||
|
}()
|
||||||
|
|
||||||
|
defer span.Finish()
|
||||||
|
resultVar0 := a.app.CheckIntegrity()
|
||||||
|
|
||||||
|
return resultVar0
|
||||||
|
}
|
||||||
|
|
||||||
func (a *OpenTracingAppLayer) CheckMandatoryS3Fields(settings *model.FileSettings) *model.AppError {
|
func (a *OpenTracingAppLayer) CheckMandatoryS3Fields(settings *model.FileSettings) *model.AppError {
|
||||||
origCtx := a.ctx
|
origCtx := a.ctx
|
||||||
span, newCtx := tracing.StartSpanWithParentByContext(a.ctx, "app.CheckMandatoryS3Fields")
|
span, newCtx := tracing.StartSpanWithParentByContext(a.ctx, "app.CheckMandatoryS3Fields")
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user