Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
storage: fix az delete obj bug (#81)
Browse files Browse the repository at this point in the history
Signed-off-by: huanghaoyuanhhy <[email protected]>
  • Loading branch information
huanghaoyuanhhy authored Mar 5, 2024
1 parent 76f3ae3 commit 658b5fa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions storage/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,13 @@ func (a *AzureClient) DeleteObjects(ctx context.Context, i DeleteObjectsInput) e
wp.Start()

for _, key := range i.Keys {
if _, err := a.cli.DeleteBlob(ctx, i.Bucket, key, nil); err != nil {
return fmt.Errorf("storage: azure delete object %w", err)
job := func(ctx context.Context) error {
if _, err := a.cli.DeleteBlob(ctx, i.Bucket, key, nil); err != nil {
return fmt.Errorf("storage: azure delete object %w", err)
}
return nil
}
wp.Submit(job)
}
wp.Done()

Expand Down

0 comments on commit 658b5fa

Please sign in to comment.