Removed (*App).Shutdown and updated all references. (#15088)
Этот коммит содержится в:
@@ -117,14 +117,6 @@ func (a *App) InitServer() {
|
||||
a.saml = a.srv.Saml
|
||||
}
|
||||
|
||||
// DO NOT CALL THIS.
|
||||
// This is to avoid having to change all the code in cmd/mattermost/commands/* for now
|
||||
// shutdown should be called directly on the server
|
||||
func (a *App) Shutdown() {
|
||||
a.Srv().Shutdown()
|
||||
a.srv = nil
|
||||
}
|
||||
|
||||
func (a *App) initJobs() {
|
||||
if jobsLdapSyncInterface != nil {
|
||||
a.srv.Jobs.LdapSync = jobsLdapSyncInterface(a)
|
||||
|
||||
@@ -83,10 +83,6 @@ type AppIface interface {
|
||||
CreateUser(user *model.User) (*model.User, *model.AppError)
|
||||
// Creates and stores FileInfos for a post created before the FileInfos table existed.
|
||||
MigrateFilenamesToFileInfos(post *model.Post) []*model.FileInfo
|
||||
// DO NOT CALL THIS.
|
||||
// This is to avoid having to change all the code in cmd/mattermost/commands/* for now
|
||||
// shutdown should be called directly on the server
|
||||
Shutdown()
|
||||
// DefaultChannelNames returns the list of system-wide default channel names.
|
||||
//
|
||||
// By default the list will be (not necessarily in this order):
|
||||
|
||||
@@ -24,7 +24,7 @@ func TestAppRace(t *testing.T) {
|
||||
a.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.ListenAddress = ":0" })
|
||||
serverErr := a.StartServer()
|
||||
require.NoError(t, serverErr)
|
||||
a.Shutdown()
|
||||
a.Srv().Shutdown()
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -13330,21 +13330,6 @@ func (a *OpenTracingAppLayer) SetTeamIconFromMultiPartFile(teamId string, file m
|
||||
return resultVar0
|
||||
}
|
||||
|
||||
func (a *OpenTracingAppLayer) Shutdown() {
|
||||
origCtx := a.ctx
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(a.ctx, "app.Shutdown")
|
||||
|
||||
a.ctx = newCtx
|
||||
a.app.Srv().Store.SetContext(newCtx)
|
||||
defer func() {
|
||||
a.app.Srv().Store.SetContext(origCtx)
|
||||
a.ctx = origCtx
|
||||
}()
|
||||
|
||||
defer span.Finish()
|
||||
a.app.Shutdown()
|
||||
}
|
||||
|
||||
func (a *OpenTracingAppLayer) SlackAddBotUser(teamId string, log *bytes.Buffer) *model.User {
|
||||
origCtx := a.ctx
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(a.ctx, "app.SlackAddBotUser")
|
||||
|
||||
Ссылка в новой задаче
Block a user