set upload buffer settings

This commit is contained in:
Robert Lippens 2019-08-14 00:41:45 -07:00
parent cb8b60c399
commit 60a0613772
No known key found for this signature in database
GPG key ID: 9984DABBD3F82E8F

View file

@ -51,8 +51,12 @@ func (az *azureBlobStore) Create(ctx context.Context, step int64, r io.Reader) e
if err != nil {
return err
}
opts := &azblob.UploadStreamToBlockBlobOptions{
BufferSize: 4 * 1024 * 1024,
MaxBuffers: 5,
}
blobURL := az.containerURL.NewBlockBlobURL(fmt.Sprintf("%d", step))
_, err = azblob.UploadStreamToBlockBlob(ctx, r, blobURL, azblob.UploadStreamToBlockBlobOptions{})
_, err = azblob.UploadStreamToBlockBlob(ctx, r, blobURL, *opts)
return err
}