Add channels dataloader

https://mattermost.atlassian.net/browse/MM-43145

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2022-04-11 13:41:09 +05:30
коммит произвёл GitHub
родитель 4b354685e9
Коммит d1de4857aa
14 изменённых файлов: 277 добавлений и 90 удалений

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

@@ -1444,11 +1444,11 @@ func (s *RetryLayerChannelStore) GetForPost(postID string) (*model.Channel, erro
}
func (s *RetryLayerChannelStore) GetFromMaster(id string) (*model.Channel, error) {
func (s *RetryLayerChannelStore) GetGuestCount(channelID string, allowFromCache bool) (int64, error) {
tries := 0
for {
result, err := s.ChannelStore.GetFromMaster(id)
result, err := s.ChannelStore.GetGuestCount(channelID, allowFromCache)
if err == nil {
return result, nil
}
@@ -1465,11 +1465,11 @@ func (s *RetryLayerChannelStore) GetFromMaster(id string) (*model.Channel, error
}
func (s *RetryLayerChannelStore) GetGuestCount(channelID string, allowFromCache bool) (int64, error) {
func (s *RetryLayerChannelStore) GetMany(ids []string, allowFromCache bool) (model.ChannelList, error) {
tries := 0
for {
result, err := s.ChannelStore.GetGuestCount(channelID, allowFromCache)
result, err := s.ChannelStore.GetMany(ids, allowFromCache)
if err == nil {
return result, nil
}