Skip to content

Commit

Permalink
Merge pull request #2568 from lpsinger/circulars-verions-kafka
Browse files Browse the repository at this point in the history
Always send new versions of GCN Circulars over Kafka
  • Loading branch information
dakota002 authored Sep 4, 2024
2 parents 6b8be21 + ce6af66 commit 7bf8201
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions app/table-streams/circulars/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,19 @@ export const handler = createTriggerHandler(
promises.push(removeIndex(id))
} /* (eventName === 'INSERT' || eventName === 'MODIFY') */ else {
const circular = unmarshallTrigger(dynamodb!.NewImage) as Circular
promises.push(putIndex(circular))
const { sub, ...cleanedCircular } = circular
promises.push(
putIndex(circular),
sendKafka(
'gcn.circulars',
JSON.stringify({
$schema: circularsJsonSchemaId,
...cleanedCircular,
})
)
)
if (eventName === 'INSERT') {
promises.push(send(circular))
const { sub, ...cleanedCircular } = circular
promises.push(
sendKafka(
'gcn.circulars',
JSON.stringify({
$schema: circularsJsonSchemaId,
...cleanedCircular,
})
)
)
}
}

Expand Down

0 comments on commit 7bf8201

Please sign in to comment.