Migrates Channel.GetAllChannelsForExportAfter to sync by default (#11273)

Этот коммит содержится в:
Rodrigo Villablanca Vásquez
2019-06-19 07:31:51 -04:00
коммит произвёл George Goldberg
родитель 2ce36c2eb1
Коммит c40017b39d
5 изменённых файлов: 42 добавлений и 39 удалений

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

@@ -146,14 +146,12 @@ func (a *App) ExportAllTeams(writer io.Writer) *model.AppError {
func (a *App) ExportAllChannels(writer io.Writer) *model.AppError {
afterId := strings.Repeat("0", 26)
for {
result := <-a.Srv.Store.Channel().GetAllChannelsForExportAfter(1000, afterId)
channels, err := a.Srv.Store.Channel().GetAllChannelsForExportAfter(1000, afterId)
if result.Err != nil {
return result.Err
if err != nil {
return err
}
channels := result.Data.([]*model.ChannelForExport)
if len(channels) == 0 {
break
}