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

Commit

Permalink
Increase upload buffer size in send to failed
Browse files Browse the repository at this point in the history
  • Loading branch information
jraddaoui committed Dec 4, 2023
1 parent b0cb15c commit 9906473
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/sfa/activities/send_to_failed_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ func (sf *SendToFailedBucketActivity) Execute(ctx context.Context, params *SendT
return nil, err
}
res.FailedKey = "Failed_" + params.Key
writerOptions := &blob.WriterOptions{
ContentType: "application/octet-stream",
BufferSize: 100_000_000,
}

switch params.FailureType {
case FailureTransfer:
err = sf.failedTransferBucket.Upload(ctx, res.FailedKey, f, &blob.WriterOptions{ContentType: "application/octet-stream"})
err = sf.failedTransferBucket.Upload(ctx, res.FailedKey, f, writerOptions)
case FailureSIP:
err = sf.failedSipBucket.Upload(ctx, res.FailedKey, f, &blob.WriterOptions{ContentType: "application/octet-stream"})
err = sf.failedSipBucket.Upload(ctx, res.FailedKey, f, writerOptions)
}
if err != nil {
return nil, err
Expand Down

0 comments on commit 9906473

Please sign in to comment.