[MM-15803] Migrate "Session.AnalyticsSessionCount" to Sync by default (#10948)

* [MM-15803] Migrate "Session.AnalyticsSessionCount" to Sync by default

* Use Explict Async for sessionChan in analytics.go
Этот коммит содержится в:
Bolarinwa Balogun
2019-05-27 12:54:46 -04:00
коммит произвёл Jesús Espino
родитель ff0d3ab00b
Коммит 674b6f2285
5 изменённых файлов: 35 добавлений и 26 удалений

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

@@ -206,7 +206,12 @@ func (a *App) GetAnalytics(name string, teamId string) (model.AnalyticsRows, *mo
close(commandChan)
}()
sessionChan := a.Srv.Store.Session().AnalyticsSessionCount()
sessionChan := make(chan store.StoreResult, 1)
go func() {
count, err := a.Srv.Store.Session().AnalyticsSessionCount()
sessionChan <- store.StoreResult{Data: count, Err: err}
close(sessionChan)
}()
var fileChan store.StoreChannel
var hashtagChan store.StoreChannel