Skip to content

Commit

Permalink
fix after review
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pfus committed Dec 16, 2024
1 parent cfb818b commit 4c31de5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion azure_storage_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func (util *snowflakeAzureClient) nativeDownloadFile(
}
if meta.options.GetFileToStream {
blobDownloadResponse, err := withCloudStorageTimeout(util.cfg, func(ctx context.Context) (azblob.DownloadStreamResponse, error) {
return blobClient.DownloadStream(context.Background(), &azblob.DownloadStreamOptions{})
return blobClient.DownloadStream(ctx, &azblob.DownloadStreamOptions{})
})
if err != nil {
return err
Expand Down
6 changes: 3 additions & 3 deletions s3_storage_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (util *snowflakeS3Client) uploadFile(
if meta.realSrcStream != nil {
uploadStream = meta.realSrcStream
}
return uploader.Upload(context.Background(), &s3.PutObjectInput{
return uploader.Upload(ctx, &s3.PutObjectInput{
Bucket: &s3loc.bucketName,
Key: &s3path,
Body: bytes.NewBuffer(uploadStream.Bytes()),
Expand All @@ -211,13 +211,13 @@ func (util *snowflakeS3Client) uploadFile(
if err != nil {
return nil, err
}
return uploader.Upload(context.Background(), &s3.PutObjectInput{
return uploader.Upload(ctx, &s3.PutObjectInput{
Bucket: &s3loc.bucketName,
Key: &s3path,
Body: file,
Metadata: s3Meta,
})

})

if err != nil {
Expand Down

0 comments on commit 4c31de5

Please sign in to comment.