Merge branch 'master' into mark-as-unread

Этот коммит содержится в:
Harrison Healey
2019-10-29 10:11:41 -04:00
родитель 9b1ba32dc6 38c0bde7f8
Коммит eb36329e8d
112 изменённых файлов: 1569 добавлений и 1479 удалений

Просмотреть файл

@@ -2776,6 +2776,23 @@ func (s *TimerLayerGroupStore) GetByIDs(groupIDs []string) ([]*model.Group, *mod
return resultVar0, resultVar1
}
func (s *TimerLayerGroupStore) GetByName(name string) (*model.Group, *model.AppError) {
start := timemodule.Now()
resultVar0, resultVar1 := s.GroupStore.GetByName(name)
t := timemodule.Now()
elapsed := t.Sub(start)
if s.Root.Metrics != nil {
success := "false"
if resultVar1 == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetByName", success, float64(elapsed))
}
return resultVar0, resultVar1
}
func (s *TimerLayerGroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, *model.AppError) {
start := timemodule.Now()
@@ -2792,6 +2809,23 @@ func (s *TimerLayerGroupStore) GetByRemoteID(remoteID string, groupSource model.
return resultVar0, resultVar1
}
func (s *TimerLayerGroupStore) GetByUser(userId string) ([]*model.Group, *model.AppError) {
start := timemodule.Now()
resultVar0, resultVar1 := s.GroupStore.GetByUser(userId)
t := timemodule.Now()
elapsed := t.Sub(start)
if s.Root.Metrics != nil {
success := "false"
if resultVar1 == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetByUser", success, float64(elapsed))
}
return resultVar0, resultVar1
}
func (s *TimerLayerGroupStore) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) {
start := timemodule.Now()