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

Commit

Permalink
Make sure to obey rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
eyj committed Oct 5, 2016
1 parent d7304ce commit 082af68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ func BatchRecords(records <-chan Record, batches chan<- []Record, batchSize int)
// Switch buffers before we start building the next batch.
currentBuf = (currentBuf + 1) % 2
next = 0

// Make sure we do not violate the AWS limit of 5 submissions/second
time.Sleep(250 * time.Millisecond)
}
}

Expand Down

0 comments on commit 082af68

Please # to comment.