@@ -233,15 +233,9 @@ func (impl AppListingServiceImpl) FetchOverviewAppsByEnvironment(envId, limit, o
233
233
resp .CreatedBy = fmt .Sprintf ("%s (inactive)" , createdBy .EmailId )
234
234
}
235
235
}
236
- envContainers , err := impl .appListingRepository . FetchOverviewAppsByEnvironment (envId , limit , offset )
236
+ envContainers , err := impl .FetchAppsEnvContainers (envId , limit , offset )
237
237
if err != nil {
238
- impl .Logger .Errorw ("failed to fetch environment containers" , "err" , err , "envId" , envId )
239
- return resp , err
240
- }
241
-
242
- err = impl .updateAppStatusForHelmTypePipelines (envContainers )
243
- if err != nil {
244
- impl .Logger .Errorw ("err, updateAppStatusForHelmTypePipelines" , "envId" , envId , "err" , err )
238
+ impl .Logger .Errorw ("failed to fetch env containers" , "err" , err , "envId" , envId )
245
239
return resp , err
246
240
}
247
241
@@ -293,6 +287,21 @@ func getUniqueArtifacts(artifactIds []int) (uniqueArtifactIds []int) {
293
287
return uniqueArtifactIds
294
288
}
295
289
290
+ func (impl AppListingServiceImpl ) FetchAppsEnvContainers (envId , limit , offset int ) ([]* AppView.AppEnvironmentContainer , error ) {
291
+ envContainers , err := impl .appListingRepository .FetchAppsEnvContainers (envId , limit , offset )
292
+ if err != nil {
293
+ impl .Logger .Errorw ("failed to fetch environment containers" , "err" , err , "envId" , envId )
294
+ return nil , err
295
+ }
296
+
297
+ err = impl .updateAppStatusForHelmTypePipelines (envContainers )
298
+ if err != nil {
299
+ impl .Logger .Errorw ("err, updateAppStatusForHelmTypePipelines" , "envId" , envId , "err" , err )
300
+ return nil , err
301
+ }
302
+ return envContainers , nil
303
+ }
304
+
296
305
func (impl AppListingServiceImpl ) FetchAllDevtronManagedApps () ([]AppNameTypeIdContainer , error ) {
297
306
impl .Logger .Debug ("reached at FetchAllDevtronManagedApps:" )
298
307
apps := make ([]AppNameTypeIdContainer , 0 )
0 commit comments