Merged
Conversation
If it is an unsupported Runtime, it ends with an error. Therefore, I checked it at an early stage
DeviaVir
approved these changes
Jun 8, 2017
lib/main.js
Outdated
| console.log(`!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| The event received by AWS Lambda is basically Object. | ||
| For \`node-lambda\`, if event.json is an array, | ||
| constit is treated as multiple events and run multiple times. |
Collaborator
There was a problem hiding this comment.
Would write it as:
Usually you will receive a single Object from AWS Lambda.
We added support for event.json to contain an array,
so you can easily test run multiple events.
lib/main.js
Outdated
| return _argv.indexOf('--eventFile') | ||
| })() | ||
|
|
||
| // In order to reproduce the movement of callbackWaitsForEmptyEventLoop, |
Collaborator
There was a problem hiding this comment.
the movement => the logic?
the movement -> the logic
demian85
reviewed
Jun 8, 2017
| const context = require(path.join(process.cwd(), program.contextFile)) | ||
|
|
||
| this._runHandler(handler, event, program, context) | ||
| if (Object.prototype.toString.call(event) !== '[object Array]') { |
Contributor
Author
There was a problem hiding this comment.
Thank you! I'll try!
|
Are those events run in order? Would be awesome! |
Contributor
Author
|
@demian85 |
|
Yes I can do that later, don't have time today. Perhaps tomorrow or this weekend. Thanks. |
Contributor
Author
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is a fix of #283.
Please point out if there is something about the following two points.
--eventFile, but should I use another option?node-lambda runinternally, but is it better to do another way?