MM-16780 Migrate "Team.AnalyticsGetTeamCountForScheme" to Sync by default (#11588)

* Changed the implementation of AnalyticsGetTeamCountForScheme to sync

* Updated the Store interface

* Updated the AnalyticsGetTeamCountForScheme tests

* Updated the autogenerated mocks

* Updated trackPermissions to use the modified method
Этот коммит содержится в:
Tim Scheuermann
2019-07-17 01:10:30 +02:00
коммит произвёл Jesús Espino
родитель 1cb32b2331
Коммит 1da858ac4c
5 изменённых файлов: 32 добавлений и 25 удалений

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

@@ -826,10 +826,7 @@ func (a *App) trackPermissions() {
channelGuestPermissions = strings.Join(role.Permissions, " ")
}
var count int64 = 0
if res := <-a.Srv.Store.Team().AnalyticsGetTeamCountForScheme(scheme.Id); res.Err == nil {
count = res.Data.(int64)
}
count, _ := a.Srv.Store.Team().AnalyticsGetTeamCountForScheme(scheme.Id)
a.SendDiagnostic(TRACK_PERMISSIONS_TEAM_SCHEMES, map[string]interface{}{
"scheme_id": scheme.Id,