Skip to content

Commit

Permalink
Fix: stuck R2 (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky authored Jun 18, 2024
1 parent df3710b commit 8cf5107
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/blob/r2.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ func (r2 *R2) saveBlob(ctx context.Context, blob Blob) {
log.Info().Str("blob", blob.String()).Int("size", blob.Size()).Msg("saving blob...")
if err := r2.Save(timeoutCtx, blob); err != nil {
log.Err(err).Str("blob", blob.String()).Int("size", blob.Size()).Msg("blob saving")
// if error occurred try again
r2.pool.AddTask(blob)
go func() {
// if error occurred try again
r2.pool.AddTask(blob)
}()
}
}

0 comments on commit 8cf5107

Please sign in to comment.