Skip to content

Commit

Permalink
Always send new versions of GCN Circulars over Kafka
Browse files Browse the repository at this point in the history
See #2562.
  • Loading branch information
lpsinger committed Sep 4, 2024
1 parent ccf6739 commit ce6af66
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(

Check warning on line 117 in app/table-streams/circulars/index.ts

View check run for this annotation

Codecov / codecov/patch

app/table-streams/circulars/index.ts#L116-L117

Added lines #L116 - L117 were not covered by tests
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 ce6af66

Please sign in to comment.