Skip to content

Commit

Permalink
fix: tweak timeouts for aggregator and drop unnecessary check on buff…
Browse files Browse the repository at this point in the history
…ering (#82)
  • Loading branch information
vasco-santos authored Nov 29, 2023
1 parent 96d4431 commit c62f758
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ Sentry.AWSLambda.init({
* @param {import('aws-lambda').SQSEvent} sqsEvent
*/
async function handleBufferQueueMessage (sqsEvent) {
// if one we should put back in queue
if (sqsEvent.Records.length === 1) {
return {
batchItemFailures: sqsEvent.Records.map(r => ({
itemIdentifier: r.messageId
}))
}
}

// unexpected number of records
if (sqsEvent.Records.length !== 2) {
return {
Expand Down
8 changes: 5 additions & 3 deletions stacks/aggregator-stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ export function AggregatorStack({ stack, app }) {
permissions: [
aggregatorBufferStoreBucket,
bufferQueue
]
],
timeout: '20 seconds'
},
deadLetterQueue: aggregatorPieceStoreHandleInsertDLQ.cdk.queue,
cdk: {
Expand Down Expand Up @@ -188,7 +189,8 @@ export function AggregatorStack({ stack, app }) {
bufferQueue,
aggregatorBufferStoreBucket,
aggregateOfferQueue
]
],
timeout: '20 seconds'
},
deadLetterQueue: bufferQueueDLQ.cdk.queue,
cdk: {
Expand Down Expand Up @@ -243,7 +245,7 @@ export function AggregatorStack({ stack, app }) {
aggregatorBufferStoreBucket,
pieceAcceptQueue
],
timeout: '10 minutes'
timeout: '5 minutes'
},
deadLetterQueue: aggregatorAggregateStoreHandleInsertToPieceAcceptDLQ.cdk.queue,
cdk: {
Expand Down

0 comments on commit c62f758

Please sign in to comment.