[MM-39631] mirgate user store to sqlx (#19403)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d5b24e383d
Коммит
440790dad6
@@ -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()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user