MM-45193 Use context for channel logging (#20575)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5f4da3f308
Коммит
6dc897b04f
@@ -480,7 +480,7 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
return nil, errors.Wrap(err, "Unable to create opengraphdata cache")
|
||||
}
|
||||
|
||||
s.createPushNotificationsHub()
|
||||
s.createPushNotificationsHub(request.EmptyContext(s.GetLogger()))
|
||||
|
||||
if err2 := i18n.InitTranslations(*s.Config().LocalizationSettings.DefaultServerLocale, *s.Config().LocalizationSettings.DefaultClientLocale); err2 != nil {
|
||||
return nil, errors.Wrapf(err2, "unable to load Mattermost translation files")
|
||||
@@ -653,7 +653,8 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
s.AddConfigListener(func(old, new *model.Config) {
|
||||
appInstance := New(ServerConnector(s.Channels()))
|
||||
if *old.GuestAccountsSettings.Enable && !*new.GuestAccountsSettings.Enable {
|
||||
if appErr := appInstance.DeactivateGuests(request.EmptyContext()); appErr != nil {
|
||||
c := request.EmptyContext(s.GetLogger())
|
||||
if appErr := appInstance.DeactivateGuests(c); appErr != nil {
|
||||
mlog.Error("Unable to deactivate guest accounts", mlog.Err(appErr))
|
||||
}
|
||||
}
|
||||
@@ -662,7 +663,8 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
// Disable active guest accounts on first run if guest accounts are disabled
|
||||
if !*s.Config().GuestAccountsSettings.Enable {
|
||||
appInstance := New(ServerConnector(s.Channels()))
|
||||
if appErr := appInstance.DeactivateGuests(request.EmptyContext()); appErr != nil {
|
||||
c := request.EmptyContext(s.GetLogger())
|
||||
if appErr := appInstance.DeactivateGuests(c); appErr != nil {
|
||||
mlog.Error("Unable to deactivate guest accounts", mlog.Err(appErr))
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user