Skip to content
Permalink
Browse files
fix(cleanup): do not use stages-storage-cache when getting all stages…
… list
  • Loading branch information
distorhead committed Dec 8, 2021
1 parent f6f0ca0 commit 7e9651ba0a78319bb270fb8cbfd8614e08bc56fb
Showing with 2 additions and 10 deletions.
  1. +2 −10 pkg/storage/manager/storage_manager.go
@@ -232,17 +232,9 @@ func (m *StorageManager) ResetStagesStorageCache(ctx context.Context) error {
}

func (m *StorageManager) GetStageDescriptionList(ctx context.Context) ([]*image.StageDescription, error) {
var stageIDs []image.StageID

found, stageIDs, err := m.StagesStorageCache.GetAllStages(ctx, m.ProjectName)
stageIDs, err := m.StagesStorage.GetStagesIDs(ctx, m.ProjectName)
if err != nil {
return nil, fmt.Errorf("error getting stages ids from stages storage cache: %s", err)
}
if !found {
stageIDs, err = m.StagesStorage.GetStagesIDs(ctx, m.ProjectName)
if err != nil {
return nil, fmt.Errorf("error getting stages ids from %s: %s", m.StagesStorage, err)
}
return nil, fmt.Errorf("error getting stages ids from %s: %s", m.StagesStorage, err)
}

var mutex sync.Mutex

0 comments on commit 7e9651b

Please sign in to comment.