[MM-25714] Keeps track of the import lines of the posts while importing to report the right line on error (#14752)
* [MM-25714] Keeps track of the import lines of the posts while importing to report the right line on error * Adding review comments * Reverse the order of the error and error line params
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ea06c291df
Коммит
6cd898fab7
@@ -4476,20 +4476,20 @@ func (s *TimerLayerPostStore) Overwrite(post *model.Post) (*model.Post, *model.A
|
||||
return resultVar0, resultVar1
|
||||
}
|
||||
|
||||
func (s *TimerLayerPostStore) OverwriteMultiple(posts []*model.Post) ([]*model.Post, *model.AppError) {
|
||||
func (s *TimerLayerPostStore) OverwriteMultiple(posts []*model.Post) ([]*model.Post, int, *model.AppError) {
|
||||
start := timemodule.Now()
|
||||
|
||||
resultVar0, resultVar1 := s.PostStore.OverwriteMultiple(posts)
|
||||
resultVar0, resultVar1, resultVar2 := s.PostStore.OverwriteMultiple(posts)
|
||||
|
||||
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
success := "false"
|
||||
if resultVar1 == nil {
|
||||
if resultVar2 == nil {
|
||||
success = "true"
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("PostStore.OverwriteMultiple", success, elapsed)
|
||||
}
|
||||
return resultVar0, resultVar1
|
||||
return resultVar0, resultVar1, resultVar2
|
||||
}
|
||||
|
||||
func (s *TimerLayerPostStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError) {
|
||||
@@ -4556,20 +4556,20 @@ func (s *TimerLayerPostStore) Save(post *model.Post) (*model.Post, *model.AppErr
|
||||
return resultVar0, resultVar1
|
||||
}
|
||||
|
||||
func (s *TimerLayerPostStore) SaveMultiple(posts []*model.Post) ([]*model.Post, *model.AppError) {
|
||||
func (s *TimerLayerPostStore) SaveMultiple(posts []*model.Post) ([]*model.Post, int, *model.AppError) {
|
||||
start := timemodule.Now()
|
||||
|
||||
resultVar0, resultVar1 := s.PostStore.SaveMultiple(posts)
|
||||
resultVar0, resultVar1, resultVar2 := s.PostStore.SaveMultiple(posts)
|
||||
|
||||
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
success := "false"
|
||||
if resultVar1 == nil {
|
||||
if resultVar2 == nil {
|
||||
success = "true"
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("PostStore.SaveMultiple", success, elapsed)
|
||||
}
|
||||
return resultVar0, resultVar1
|
||||
return resultVar0, resultVar1, resultVar2
|
||||
}
|
||||
|
||||
func (s *TimerLayerPostStore) Search(teamId string, userId string, params *model.SearchParams) (*model.PostList, *model.AppError) {
|
||||
|
||||
Ссылка в новой задаче
Block a user