Skip to content

Commit

Permalink
fix(catalog-builder): average execution time is 100x slower than prev…
Browse files Browse the repository at this point in the history
…iously (#1455)

In #1441 we upgraded the SDK to v3. During this upgrade we replaced the
deprecated InvokeAsyncCommand with InvokeCommand. It was missed that the
default invocation type for this command is `RequestResponse`, when it
needs to be `Event`. This caused the catalog-builder function to await
the completion of the feed-builder function.


----

*By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license*

---------

Signed-off-by: github-actions <[email protected]>
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
mrgrain and github-actions authored Sep 13, 2024
1 parent 208429a commit b10ca23
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/__tests__/__snapshots__/construct-hub.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/__tests__/devapp/__snapshots__/snapshot.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/backend/catalog-builder/catalog-builder.lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,11 @@ export async function handler(event: CatalogBuilderInput, context: Context) {
} else {
if (process.env.FEED_BUILDER_FUNCTION_NAME) {
// Catalog is updated. Update the RSS/ATOM feed
console.log(`Updating feeds...`);
await aws.LAMBDA_CLIENT.send(
new InvokeCommand({
FunctionName: process.env.FEED_BUILDER_FUNCTION_NAME,
InvocationType: 'Event',
Payload: JSON.stringify({}),
})
);
Expand Down

0 comments on commit b10ca23

Please sign in to comment.