@@ -28,7 +28,6 @@ type WorkflowStatusLatestRepository interface {
28
28
UpdateCiWorkflowStatusLatest (model * CiWorkflowStatusLatest ) error
29
29
GetCiWorkflowStatusLatestByPipelineId (pipelineId int ) (* CiWorkflowStatusLatest , error )
30
30
GetCiWorkflowStatusLatestByAppId (appId int ) ([]* CiWorkflowStatusLatest , error )
31
- GetByPipelineIds (pipelineIds []int ) ([]int , error )
32
31
GetCiWorkflowStatusLatestByPipelineIds (pipelineIds []int ) ([]* CiWorkflowStatusLatest , error )
33
32
DeleteCiWorkflowStatusLatestByPipelineId (pipelineId int ) error
34
33
@@ -129,23 +128,6 @@ func (impl *WorkflowStatusLatestRepositoryImpl) DeleteCiWorkflowStatusLatestByPi
129
128
return nil
130
129
}
131
130
132
- func (impl * WorkflowStatusLatestRepositoryImpl ) GetByPipelineIds (pipelineIds []int ) ([]int , error ) {
133
- if len (pipelineIds ) == 0 {
134
- return []int {}, nil
135
- }
136
-
137
- var cachedPipelineIds []int
138
- err := impl .dbConnection .Model (& CiWorkflowStatusLatest {}).
139
- Column ("pipeline_id" ).
140
- Where ("pipeline_id IN (?)" , pg .In (pipelineIds )).
141
- Select (& cachedPipelineIds )
142
- if err != nil {
143
- impl .logger .Errorw ("error in getting cached pipeline ids" , "err" , err , "pipelineIds" , pipelineIds )
144
- return nil , err
145
- }
146
- return cachedPipelineIds , nil
147
- }
148
-
149
131
func (impl * WorkflowStatusLatestRepositoryImpl ) GetCiWorkflowStatusLatestByPipelineIds (pipelineIds []int ) ([]* CiWorkflowStatusLatest , error ) {
150
132
if len (pipelineIds ) == 0 {
151
133
return []* CiWorkflowStatusLatest {}, nil
0 commit comments