File tree Expand file tree Collapse file tree
updatePrescriptionStatus/src/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ Resources:
113113 MessageRetentionPeriod : 86400 # 1 day in seconds
114114 RedrivePolicy :
115115 deadLetterTargetArn : !GetAtt PostDatedNotificationsDeadLetterQueue.Arn
116- maxReceiveCount : 13 # processed every 6 hours for 3 days, plus one for the first time it's placed on queue.
116+ maxReceiveCount : 166 # 999 hours / 6 hours
117117 VisibilityTimeout : 300
118118
119119 PostDatedNotificationsDeadLetterQueue :
Original file line number Diff line number Diff line change @@ -34,6 +34,21 @@ export interface PostDatedNotifyDataItem extends NotifyDataItem {
3434 LineItemID : string
3535}
3636
37+ /**
38+ * The structure of a single SQS message in a batch send.
39+ * I couldn't find this type exported from the SDK, and the Message type that IS exported is for receiving data,
40+ * not sending it.
41+ *
42+ * So, I've just done it myself. These are the core attrtibutes we use.
43+ */
44+ export interface SQSBatchMessage {
45+ Id : string
46+ MessageBody : string
47+ MessageDeduplicationId : string
48+ MessageGroupId : string
49+ MessageAttributes : { [ key : string ] : { DataType : string ; StringValue : string } }
50+ }
51+
3752/**
3853 * The fields stored in the Notifications table potentially updated by the Notify callback.
3954 */
Original file line number Diff line number Diff line change @@ -8,19 +8,12 @@ import {
88 NotifyDataItem ,
99 PostDatedNotifyDataItem ,
1010 PSUDataItem ,
11- PSUDataItemWithPrevious
11+ PSUDataItemWithPrevious ,
12+ SQSBatchMessage
1213} from "@psu-common/commonTypes"
1314
1415import { checkSiteOrSystemIsNotifyEnabled } from "../validation/notificationSiteAndSystemFilters"
1516
16- type SQSBatchMessage = {
17- Id : string
18- MessageBody : string
19- MessageDeduplicationId : string
20- MessageGroupId : string
21- MessageAttributes : { [ key : string ] : { DataType : string ; StringValue : string } }
22- }
23-
2417const sqsUrl : string | undefined = process . env . NHS_NOTIFY_PRESCRIPTIONS_SQS_QUEUE_URL
2518const postDatedSqsUrl : string | undefined = process . env . POST_DATED_PRESCRIPTIONS_SQS_QUEUE_URL
2619
You can’t perform that action at this time.
0 commit comments