Skip to content

Commit

Permalink
fix(cleanup): do not use stages-storage-cache when getting all stages…
Browse files Browse the repository at this point in the history
… list
  • Loading branch information
distorhead committed Dec 8, 2021
1 parent f6f0ca0 commit 7e9651b
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pkg/storage/manager/storage_manager.go
Expand Up @@ -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
Expand Down

0 comments on commit 7e9651b

Please sign in to comment.