MM-15295: Migrate commandstore.AnalyticsCommandCount to sync by default (#10746)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
d59843725f
Коммит
d4225349ef
@@ -193,7 +193,14 @@ func (a *App) GetAnalytics(name string, teamId string) (model.AnalyticsRows, *mo
|
||||
}()
|
||||
|
||||
oHookChan := a.Srv.Store.Webhook().AnalyticsOutgoingCount(teamId)
|
||||
commandChan := a.Srv.Store.Command().AnalyticsCommandCount(teamId)
|
||||
|
||||
commandChan := make(chan store.StoreResult, 1)
|
||||
go func() {
|
||||
c, err := a.Srv.Store.Command().AnalyticsCommandCount(teamId)
|
||||
commandChan <- store.StoreResult{Data: c, Err: err}
|
||||
close(commandChan)
|
||||
}()
|
||||
|
||||
sessionChan := a.Srv.Store.Session().AnalyticsSessionCount()
|
||||
|
||||
var fileChan store.StoreChannel
|
||||
|
||||
@@ -193,9 +193,7 @@ func (a *App) trackActivity() {
|
||||
postsCount = pcr.Data.(int64)
|
||||
}
|
||||
|
||||
if scc := <-a.Srv.Store.Command().AnalyticsCommandCount(""); scc.Err == nil {
|
||||
slashCommandsCount = scc.Data.(int64)
|
||||
}
|
||||
slashCommandsCount, _ = a.Srv.Store.Command().AnalyticsCommandCount("")
|
||||
|
||||
if c, err := a.Srv.Store.Webhook().AnalyticsIncomingCount(""); err == nil {
|
||||
incomingWebhooksCount = c
|
||||
|
||||
Ссылка в новой задаче
Block a user