Add AWS Metering service support (#15290)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
50e37068b5
Коммит
1c0d590c81
@@ -7384,6 +7384,26 @@ func (s *RetryLayerUserStore) AnalyticsActiveCount(time int64, options model.Use
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerUserStore) AnalyticsActiveCountForPeriod(startTime int64, endTime int64, options model.UserCountOptions) (int64, error) {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.UserStore.AnalyticsActiveCountForPeriod(startTime, endTime, options)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerUserStore) AnalyticsGetExternalUsers(hostDomain string) (bool, *model.AppError) {
|
||||
|
||||
return s.UserStore.AnalyticsGetExternalUsers(hostDomain)
|
||||
|
||||
Ссылка в новой задаче
Block a user