* [MM-42027] - Invitation Email is resent as a Reminder after invalidating pending email invites

* generate app layers mocks

* add tests

* improve err handling

* fix translations

* change status code
Этот коммит содержится в:
Allan Guwatudde
2022-02-25 20:02:08 +03:00
коммит произвёл GitHub
родитель 3c48be040f
Коммит 81f82729d2
13 изменённых файлов: 204 добавлений и 2 удалений

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

@@ -5086,6 +5086,27 @@ func (s *RetryLayerJobStore) GetAllByType(jobType string) ([]*model.Job, error)
}
func (s *RetryLayerJobStore) GetAllByTypeAndStatus(jobType string, status string) ([]*model.Job, error) {
tries := 0
for {
result, err := s.JobStore.GetAllByTypeAndStatus(jobType, status)
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
}
timepkg.Sleep(100 * timepkg.Millisecond)
}
}
func (s *RetryLayerJobStore) GetAllByTypePage(jobType string, offset int, limit int) ([]*model.Job, error) {
tries := 0