tango-app-api-infra 3.8.9 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -969,6 +969,7 @@ function mergeDuplicateImagesWithUncheck( existingData, inputData, status ) {
|
|
|
969
969
|
|
|
970
970
|
export async function sendSqsMessage( inputData, tempId, getStoreType, storeId ) {
|
|
971
971
|
const sqs = JSON.parse( process.env.SQS );
|
|
972
|
+
const openSearch = JSON.parse( process.env.OPENSEARCH );
|
|
972
973
|
const sqsName = getStoreType > 0? sqs.revopTrackTicket: sqs.revopTicket;
|
|
973
974
|
const sqsProduceQueue = getStoreType > 0 ? {
|
|
974
975
|
QueueUrl: `${sqs.url}${sqsName}`,
|
|
@@ -977,7 +978,7 @@ export async function sendSqsMessage( inputData, tempId, getStoreType, storeId )
|
|
|
977
978
|
store_date: inputData.dateString.split( '-' ).reverse().join( '-' ),
|
|
978
979
|
bucket_name: '',
|
|
979
980
|
zone_id: 'traffic_zone',
|
|
980
|
-
process_type: '
|
|
981
|
+
process_type: 'live',
|
|
981
982
|
revop_type: 'footfall',
|
|
982
983
|
temp_id: tempId,
|
|
983
984
|
time: Date.now(),
|
|
@@ -1010,6 +1011,21 @@ export async function sendSqsMessage( inputData, tempId, getStoreType, storeId )
|
|
|
1010
1011
|
} );
|
|
1011
1012
|
return false;
|
|
1012
1013
|
} else {
|
|
1014
|
+
const id =`${storeId}_${inputData.dateString.split( '-' ).reverse().join( '-' )}_${getStoreType > 0? "live":"reduction"}_${Date.now()}`
|
|
1015
|
+
const logs = {
|
|
1016
|
+
QueueUrl: sqsProduceQueue.QueueUrl,
|
|
1017
|
+
MessageBody: sqsProduceQueue.MessageBody,
|
|
1018
|
+
sqsQueue:sqsQueue,
|
|
1019
|
+
store_id: storeId,
|
|
1020
|
+
store_date: inputData.dateString.split( '-' ).reverse().join( '-' ),
|
|
1021
|
+
bucket_name: '',
|
|
1022
|
+
zone_id: 'traffic_zone',
|
|
1023
|
+
process_type: 'live',
|
|
1024
|
+
revop_type: 'footfall',
|
|
1025
|
+
temp_id: tempId,
|
|
1026
|
+
time: Date.now(),
|
|
1027
|
+
}
|
|
1028
|
+
await insertWithId(openSearch.revopsLog,id,logs)
|
|
1013
1029
|
return true;
|
|
1014
1030
|
}
|
|
1015
1031
|
}
|