* [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 удалений

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

@@ -4091,6 +4091,22 @@ func (s *TimerLayerJobStore) GetAllByType(jobType string) ([]*model.Job, error)
return result, err
}
func (s *TimerLayerJobStore) GetAllByTypeAndStatus(jobType string, status string) ([]*model.Job, error) {
start := timemodule.Now()
result, err := s.JobStore.GetAllByTypeAndStatus(jobType, status)
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
if s.Root.Metrics != nil {
success := "false"
if err == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("JobStore.GetAllByTypeAndStatus", success, elapsed)
}
return result, err
}
func (s *TimerLayerJobStore) GetAllByTypePage(jobType string, offset int, limit int) ([]*model.Job, error) {
start := timemodule.Now()