File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
lambdas/upsert-letter/src/handler Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -173,14 +173,12 @@ export default function createUpsertLetterHandler(deps: Deps): SQSHandler {
173173 const type = getType ( letterEvent ) ;
174174
175175 const operation = getOperationFromType ( type ) ;
176-
177- await runUpsert ( operation , letterEvent , deps ) ;
178176 metrics . putDimensions ( {
179177 FunctionName : "upsertLambda" ,
180- // eslint-disable-next-line sonarjs/pseudo-random
181- OddOrEven : `${ Math . floor ( Math . random ( ) * 10 ) % 2 } ` ,
182178 OperationType : operation . name ,
183179 } ) ;
180+
181+ await runUpsert ( operation , letterEvent , deps ) ;
184182 metrics . setProperty ( "operation" , operation . name ) ;
185183
186184 metrics . putMetric ( "MessagesProcessed" , 1 , Unit . Count ) ;
@@ -191,8 +189,6 @@ export default function createUpsertLetterHandler(deps: Deps): SQSHandler {
191189 ) ;
192190 metrics . putDimensions ( {
193191 FunctionName : "upsertLambda" ,
194- // eslint-disable-next-line sonarjs/pseudo-random
195- OddOrEven : `${ Math . floor ( Math . random ( ) * 10 ) % 2 } ` ,
196192 } ) ;
197193 metrics . putMetric ( "MessageFailed" , 1 , Unit . Count ) ;
198194 batchItemFailures . push ( { itemIdentifier : record . messageId } ) ;
You can’t perform that action at this time.
0 commit comments