mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Merge branch 'master' into mark-as-unread
This commit is contained in:
@@ -246,14 +246,13 @@ func (s *{{$.Name}}{{$substoreName}}Store) {{$index}}({{$element.Params | joinPa
|
||||
{{ else }}
|
||||
{{$element.Results | genResultsVars}} := s.{{$substoreName}}Store.{{$index}}({{$element.Params | joinParams}})
|
||||
{{ end }}
|
||||
t := timemodule.Now()
|
||||
elapsed := t.Sub(start)
|
||||
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
success := "false"
|
||||
if {{$element.Results | errorToBoolean}} {
|
||||
success = "true"
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("{{$substoreName}}Store.{{$index}}", success, float64(elapsed))
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("{{$substoreName}}Store.{{$index}}", success, elapsed)
|
||||
}
|
||||
return {{$element.Results | genResultsVars}}
|
||||
}
|
||||
|
||||
@@ -1419,7 +1419,7 @@ func (s SqlChannelStore) IsUserInChannelUseCache(userId string, channelId string
|
||||
|
||||
ids, err := s.GetAllChannelMembersForUser(userId, true, false)
|
||||
if err != nil {
|
||||
mlog.Error("SqlChannelStore.IsUserInChannelUseCache: " + err.Error())
|
||||
mlog.Error("Error getting all channel members for user", mlog.Err(err))
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -2008,7 +2008,7 @@ func (s SqlChannelStore) GetChannelsByIds(channelIds []string) ([]*model.Channel
|
||||
_, err := s.GetReplica().Select(&channels, query, params)
|
||||
|
||||
if err != nil {
|
||||
mlog.Error(fmt.Sprint(err))
|
||||
mlog.Error("Query error getting channels by ids", mlog.Err(err))
|
||||
return nil, model.NewAppError("SqlChannelStore.GetChannelsByIds", "store.sql_channel.get_channels_by_ids.app_error", nil, "", http.StatusInternalServerError)
|
||||
}
|
||||
return channels, nil
|
||||
|
||||
2255
store/timer_layer.go
2255
store/timer_layer.go
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user