Migrates Channel.GetAllChannelsForExportAfter to sync by default (#11273)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
2ce36c2eb1
Коммит
c40017b39d
@@ -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
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user