jobstore (#15250)
* Migration completed * Modify test case * Update en.json * Fix layers * Lint: remove unnecessary use of sprint * trigger CI * fix error * Fixes * fix test Co-authored-by: Rodrigo Villablanca <villa061004@gmail.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b451b3cf86
Коммит
78766625df
@@ -3883,7 +3883,7 @@ func (s *OpenTracingLayerGroupStore) UpsertMember(groupID string, userID string)
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) Delete(id string) (string, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) Delete(id string) (string, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.Delete")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3901,7 +3901,7 @@ func (s *OpenTracingLayerJobStore) Delete(id string) (string, *model.AppError) {
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) Get(id string) (*model.Job, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) Get(id string) (*model.Job, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.Get")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3919,7 +3919,7 @@ func (s *OpenTracingLayerJobStore) Get(id string) (*model.Job, *model.AppError)
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) GetAllByStatus(status string) ([]*model.Job, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) GetAllByStatus(status string) ([]*model.Job, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.GetAllByStatus")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3937,7 +3937,7 @@ func (s *OpenTracingLayerJobStore) GetAllByStatus(status string) ([]*model.Job,
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) GetAllByType(jobType string) ([]*model.Job, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) GetAllByType(jobType string) ([]*model.Job, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.GetAllByType")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3955,7 +3955,7 @@ func (s *OpenTracingLayerJobStore) GetAllByType(jobType string) ([]*model.Job, *
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) GetAllByTypePage(jobType string, offset int, limit int) ([]*model.Job, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) GetAllByTypePage(jobType string, offset int, limit int) ([]*model.Job, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.GetAllByTypePage")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3973,7 +3973,7 @@ func (s *OpenTracingLayerJobStore) GetAllByTypePage(jobType string, offset int,
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) GetAllPage(offset int, limit int) ([]*model.Job, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) GetAllPage(offset int, limit int) ([]*model.Job, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.GetAllPage")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3991,7 +3991,7 @@ func (s *OpenTracingLayerJobStore) GetAllPage(offset int, limit int) ([]*model.J
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) GetCountByStatusAndType(status string, jobType string) (int64, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) GetCountByStatusAndType(status string, jobType string) (int64, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.GetCountByStatusAndType")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -4009,7 +4009,7 @@ func (s *OpenTracingLayerJobStore) GetCountByStatusAndType(status string, jobTyp
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) GetNewestJobByStatusAndType(status string, jobType string) (*model.Job, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) GetNewestJobByStatusAndType(status string, jobType string) (*model.Job, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.GetNewestJobByStatusAndType")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -4027,7 +4027,7 @@ func (s *OpenTracingLayerJobStore) GetNewestJobByStatusAndType(status string, jo
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) GetNewestJobByStatusesAndType(statuses []string, jobType string) (*model.Job, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) GetNewestJobByStatusesAndType(statuses []string, jobType string) (*model.Job, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.GetNewestJobByStatusesAndType")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -4045,7 +4045,7 @@ func (s *OpenTracingLayerJobStore) GetNewestJobByStatusesAndType(statuses []stri
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) Save(job *model.Job) (*model.Job, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) Save(job *model.Job) (*model.Job, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.Save")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -4063,7 +4063,7 @@ func (s *OpenTracingLayerJobStore) Save(job *model.Job) (*model.Job, *model.AppE
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) UpdateOptimistically(job *model.Job, currentStatus string) (bool, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) UpdateOptimistically(job *model.Job, currentStatus string) (bool, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.UpdateOptimistically")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -4081,7 +4081,7 @@ func (s *OpenTracingLayerJobStore) UpdateOptimistically(job *model.Job, currentS
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) UpdateStatus(id string, status string) (*model.Job, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) UpdateStatus(id string, status string) (*model.Job, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.UpdateStatus")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -4099,7 +4099,7 @@ func (s *OpenTracingLayerJobStore) UpdateStatus(id string, status string) (*mode
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerJobStore) UpdateStatusOptimistically(id string, currentStatus string, newStatus string) (bool, *model.AppError) {
|
||||
func (s *OpenTracingLayerJobStore) UpdateStatusOptimistically(id string, currentStatus string, newStatus string) (bool, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "JobStore.UpdateStatusOptimistically")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
|
||||
Ссылка в новой задаче
Block a user