Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle multiple non warming events #54

Merged
merged 1 commit into from
Mar 4, 2023

Conversation

larte
Copy link
Contributor

@larte larte commented Mar 4, 2023

As an example, implementing a lambda handler for an Appsync batch resolver means handling a list of Appsync resolver events as input for the lambda handler.

Because of the multiple targets feature handling a array of events

return Promise.resolve(true)

await warmer(events)) always resolves to true.

The suggested change makes warmer return true if any event is a warmer event. This should cover most of the cases, since having both warmer events and valid ones in single invocation should not happen.

@larte larte force-pushed the fix/multiple-valid-events branch from 6133039 to edd7736 Compare March 4, 2023 08:07
Copy link
Collaborator

@naorpeled naorpeled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Thanks for your contribution you're awesome

@naorpeled naorpeled merged commit dcf5a51 into jeremydaly:master Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants