Skip to content

Commit

Permalink
fix: fix upload concurrency (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
fangbinwei authored Dec 27, 2022
1 parent eefa35a commit c9ed0ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion operation/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ func UploadObjects(root string, bucket *oss.Bucket, records <-chan utils.FileInf
var uploadedMutex sync.Mutex
var errs []error
uploaded := make([]UploadedObject, 0, 20)
var tokens = make(chan struct{}, 30)
for item := range records {
sw.Add(1)
var tokens = make(chan struct{}, 10)
go func(item utils.FileInfoType) {
defer sw.Done()
fPath := item.Path
Expand Down

0 comments on commit c9ed0ec

Please sign in to comment.