GetAllForExportAfter migrated to sync by default. (#11562)

Этот коммит содержится в:
Max Vovshin
2019-07-08 11:10:09 +03:00
коммит произвёл Miguel de la Cruz
родитель f08f7f77c3
Коммит 956c8930f5
5 изменённых файлов: 40 добавлений и 37 удалений

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

@@ -113,14 +113,12 @@ func (a *App) ExportVersion(writer io.Writer) *model.AppError {
func (a *App) ExportAllTeams(writer io.Writer) *model.AppError {
afterId := strings.Repeat("0", 26)
for {
result := <-a.Srv.Store.Team().GetAllForExportAfter(1000, afterId)
teams, err := a.Srv.Store.Team().GetAllForExportAfter(1000, afterId)
if result.Err != nil {
return result.Err
if err != nil {
return err
}
teams := result.Data.([]*model.TeamForExport)
if len(teams) == 0 {
break
}