Files
mostlymatter/server/boards/app/initialize.go
Agniva De Sarker b200a07881 v8.0 module release (#22975)
https://mattermost.atlassian.net/browse/MM-52079

```release-note
We upgrade the module version to 8.0. The new module path is github.com/mattermost-server/server/v8.
```


Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2023-04-18 11:05:28 +05:30

30 строки
756 B
Go

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
package app
import (
"context"
"github.com/mattermost/mattermost-server/server/v8/platform/shared/mlog"
)
// initialize is called when the App is first created.
func (a *App) initialize(skipTemplateInit bool) {
if !skipTemplateInit {
if err := a.InitTemplates(); err != nil {
a.logger.Error(`InitializeTemplates failed`, mlog.Err(err))
}
}
}
func (a *App) Shutdown() {
if a.blockChangeNotifier != nil {
ctx, cancel := context.WithTimeout(context.Background(), blockChangeNotifierShutdownTimeout)
defer cancel()
if !a.blockChangeNotifier.Shutdown(ctx) {
a.logger.Warn("blockChangeNotifier shutdown timed out")
}
}
}