-
-
Notifications
You must be signed in to change notification settings - Fork 37
Add easier support for callbackWaitsForEmptyEventLoop #26
Copy link
Copy link
Closed
Description
🚀 Feature Proposal
In order to make AWS works properly with mixed callback/async invocation, one might need to modify context.callbackWaitsForEmptyEventLoop.
Nowadays, it is possible with a code like this:
const proxy = awsLambdaFastify(app)
exports.handler = function(event, context, callback) {
context.callbackWaitsForEmptyEventLoop = false
return proxy(event, context, callback)
}But it would be great if it can directly provided as option. See below.
Note that in the implementation checking of the property should be done with options.hasOwnProperty or similar, since both truthy and falsy values are acceptable.
Motivation
To make typical use case easier to manage and without boilerplate code.
Example
exports.handler = awsLambdaFastify(app, {callbackWaitsForEmptyEventLoop: false})Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels