-
Notifications
You must be signed in to change notification settings - Fork 185
Description
I am using the node-lambda run command to execute a function that outputs a large amount of data (70KB+). The output is incomplete/truncated. Requests that output smaller amounts of data work fine.
It appears the process is exited before the output is completed. To work around this I removed the process.exit(0) call in the _runHandler function in /lib/main.js. It is probably there for a reason so this might not be a good fix but it worked for me.
`Lambda.prototype._runHandler = function (handler, event, runtime, context) {
var callback = function (err, result) {
if (err) {
console.log('Error: ' + err);
process.exit(-1);
} else {
console.log('Success:');
if (result) {
console.log(JSON.stringify(result));
}
//process.exit(0); (kills the above console.log output before it is done when there is a lot of data returned)
}
};`