[MM-39631] mirgate user store to sqlx (#19403)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Kirill Krotov
2022-02-09 17:26:16 +03:00
коммит произвёл GitHub
родитель d5b24e383d
Коммит 440790dad6
10 изменённых файлов: 258 добавлений и 127 удалений

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

@@ -9461,6 +9461,22 @@ func (s *TimerLayerUserStore) InferSystemInstallDate() (int64, error) {
return result, err
}
func (s *TimerLayerUserStore) InsertUsers(users []*model.User) error {
start := timemodule.Now()
err := s.UserStore.InsertUsers(users)
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
if s.Root.Metrics != nil {
success := "false"
if err == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("UserStore.InsertUsers", success, elapsed)
}
return err
}
func (s *TimerLayerUserStore) InvalidateProfileCacheForUser(userID string) {
start := timemodule.Now()