[MM-46579] Add a limit for preferences (#21780)
* add a limit for preferences * add limits to preferences * add config to telemetry * remove unneeded tags from config
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
51ac81d816
Коммит
3ad240c167
@@ -6256,10 +6256,10 @@ func (s *TimerLayerPreferenceStore) Get(userID string, category string, name str
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerPreferenceStore) GetAll(userID string) (model.Preferences, error) {
|
||||
func (s *TimerLayerPreferenceStore) GetAll(userID string, limit int) (model.Preferences, error) {
|
||||
start := time.Now()
|
||||
|
||||
result, err := s.PreferenceStore.GetAll(userID)
|
||||
result, err := s.PreferenceStore.GetAll(userID, limit)
|
||||
|
||||
elapsed := float64(time.Since(start)) / float64(time.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user