Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions s3/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ function s3LogsToSumo(bucket, objKey,context) {
});
});

var finalData = '';
var totalBytes = 0;
var isCompressed = false;
if (objKey.match(/\.gz$/)) {
Expand All @@ -53,8 +52,7 @@ function s3LogsToSumo(bucket, objKey,context) {
if (!isCompressed) {
s3Stream.on('data',function(data) {
//console.log("Read bytes:" +data.length);
finalData += data;
req.write(data+'\n');
req.write(data);
totalBytes += data.length;
});
s3Stream.on('end',finishFnc);
Expand All @@ -64,8 +62,7 @@ function s3LogsToSumo(bucket, objKey,context) {

gunzip.on('data',function(data) {
totalBytes += data.length;
req.write(data.toString()+'\n');
finalData += data.toString();
req.write(data.toString());
}).on('end',finishFnc)
.on('error',function(error) {
context.fail(error);
Expand Down