File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
6
6
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## [ Unreleased] - TBD
9
+
10
+ ### Fixed
11
+
12
+ - Post-ingest SNS topic was not being published to when deployed as a Lambda.
13
+
8
14
## [ 2.0.0] - 2023-06-26
9
15
10
16
### Removed
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export const handler = async (event, _context) => {
67
67
68
68
if ( postIngestTopicArn ) {
69
69
logger . debug ( 'Publishing to post-ingest topic: %s' , postIngestTopicArn )
70
- publishResultsToSns ( results , postIngestTopicArn )
70
+ await publishResultsToSns ( results , postIngestTopicArn )
71
71
} else {
72
72
logger . debug ( 'Skkipping post-ingest notification since no topic is configured' )
73
73
}
Original file line number Diff line number Diff line change @@ -187,11 +187,11 @@ function updateLinksWithinRecord(record) {
187
187
return record
188
188
}
189
189
190
- export function publishResultsToSns ( results , topicArn ) {
191
- results . forEach ( async ( result ) => {
190
+ export async function publishResultsToSns ( results , topicArn ) {
191
+ await Promise . all ( results . map ( async ( result ) => {
192
192
if ( result . record && ! result . error ) {
193
193
updateLinksWithinRecord ( result . record )
194
194
}
195
195
await publishRecordToSns ( topicArn , result . record , result . error )
196
- } )
196
+ } ) )
197
197
}
You can’t perform that action at this time.
0 commit comments