File tree Expand file tree Collapse file tree
packages/postDatedLambda/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export function processMessage(
6666 // NOTE: It is technically possible for the array to be empty if no existing records are found
6767 // This SHOULD never happen in practice, but catch it anyway
6868 if ( message . existingRecords . length === 0 ) {
69- logger . error ( "No existing records found for post-dated prescription, cannot process" , {
69+ logger . error ( "No existing records found for post-dated prescription, cannot process. Ignoring this message " , {
7070 badMessage : message
7171 } )
7272
Original file line number Diff line number Diff line change @@ -199,12 +199,5 @@ export async function enrichMessagesWithExistingRecords(
199199 existingRecords : recordsMap . get ( message . prescriptionData . PrescriptionID ) ?? [ ]
200200 } ) )
201201
202- for ( const msg of enrichedMessages ) {
203- logger . info ( "Prescription and most recent existing record" , {
204- prescriptionID : msg . prescriptionData . PrescriptionID ,
205- existingRecordCount : msg . existingRecords . length
206- } )
207- }
208-
209202 return enrichedMessages
210203}
Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ export async function receivePostDatedSQSMessages(logger: Logger): Promise<Array
238238/**
239239 * Forward matured post-dated messages to the Notify queue using the same payload as the update lambda.
240240 */
241- export async function sendSQSMessagesToNotificationQueue (
241+ export async function forwardSQSMessagesToNotificationQueue (
242242 logger : Logger ,
243243 messages : Array < PostDatedSQSMessage >
244244) : Promise < Array < string > > {
@@ -383,7 +383,7 @@ export async function handleProcessedMessages(
383383 const { maturedPrescriptionUpdates, immaturePrescriptionUpdates, ignoredPrescriptionUpdates} = result
384384
385385 // Move matured messages to the notification queue and remove them from the post-dated queue
386- await sendSQSMessagesToNotificationQueue ( logger , maturedPrescriptionUpdates )
386+ await forwardSQSMessagesToNotificationQueue ( logger , maturedPrescriptionUpdates )
387387 await removeSQSMessages ( logger , maturedPrescriptionUpdates )
388388
389389 // Return failed messages to the queue
You can’t perform that action at this time.
0 commit comments