From 4faa6ac6c703577a357de8c233df6dd6b0995196 Mon Sep 17 00:00:00 2001 From: Gary Xue Date: Tue, 22 Aug 2023 13:08:54 +1000 Subject: [PATCH] None add logs --- src/sqs/sqs.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sqs/sqs.ts b/src/sqs/sqs.ts index 7ef6ac99e7..9f83d51abe 100644 --- a/src/sqs/sqs.ts +++ b/src/sqs/sqs.ts @@ -282,6 +282,7 @@ export class SqsQueue { const receiveCount = Number(message.Attributes?.ApproximateReceiveCount || "1"); + const lastAttempt = receiveCount >= this.maxAttempts; const context: SQSMessageContext = { message, payload, @@ -292,7 +293,9 @@ export class SqsQueue { jiraHost: payload?.jiraHost, installationId: payload?.installationId, gitHubAppId: payload?.gitHubAppConfig?.gitHubAppId, - webhookId: payload?.webhookId + webhookId: payload?.webhookId, + receiveCount, + lastAttempt }), receiveCount, lastAttempt: receiveCount >= this.maxAttempts