Closed rclark closed 8 years ago
Fixes #35 by binding context to the function when it gets executed. This makes context functions and attributes accessible:
var streambot = require('streambot'); streambot(function(event, callback) { console.log(this.getRemainingTimeInMillis()); console.log(this.invokedFunctionArn); callback(); });
cc @emilymcafee @zmully I know at some point you folks were looking for this.
Also, for the sake of logging, added a setTimeout that will log a message when the function has about 200ms of execution time remaining.
setTimeout
Fixes #35 by binding context to the function when it gets executed. This makes context functions and attributes accessible:
cc @emilymcafee @zmully I know at some point you folks were looking for this.