Skip to content

Commit

Permalink
Remove limit for batch size count (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
VolatileBit authored and lazywithclass committed Oct 22, 2019
1 parent 2c53d07 commit 00de380
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/cloudwatch-integration.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var LIMITS = {
MAX_EVENT_MSG_SIZE_BYTES: 256000, // The real max size is 262144, we leave some room for overhead on each message
MAX_BATCH_SIZE_BYTES: 1000000, // We leave some fudge factor here too.
MAX_BATCH_SIZE_COUNT : 100 // Bigger number means fewer requests to post.
};

var find = require('lodash.find'),
Expand Down Expand Up @@ -47,8 +46,7 @@ lib.upload = function(aws, groupName, streamName, logEvents, retentionInDays, cb

var entryIndex = 0;
var bytes = 0;
while (entryIndex < logEvents.length &&
entryIndex <= LIMITS.MAX_BATCH_SIZE_COUNT) {
while (entryIndex < logEvents.length) {
var ev = logEvents[entryIndex];
// unit tests pass null elements
var evSize = ev ? Buffer.byteLength(ev.message, 'utf8') : 0;
Expand Down

0 comments on commit 00de380

Please sign in to comment.