tango-app-api-audit 3.6.2 → 3.6.4
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
|
@@ -2143,12 +2143,34 @@ export async function save( req, res ) {
|
|
|
2143
2143
|
process_type: 'audit',
|
|
2144
2144
|
} ),
|
|
2145
2145
|
};
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2146
|
+
const sqsProduceQueueCopy = {
|
|
2147
|
+
QueueUrl: `${sqs.url}track-output-copy.fifo`,
|
|
2148
|
+
MessageBody: JSON.stringify( {
|
|
2149
|
+
store_id: inputData.storeId,
|
|
2150
|
+
zone_id: [ 'traffic_zone' ],
|
|
2151
|
+
streams: streams || [],
|
|
2152
|
+
store_date: inputData.fileDate,
|
|
2153
|
+
bucket_name: 'tango-yolo-v2-output',
|
|
2154
|
+
time: '23:00',
|
|
2155
|
+
retry: 1,
|
|
2156
|
+
} ),
|
|
2157
|
+
MessageGroupId: 'my-group-1', // Required for FIFO queues
|
|
2158
|
+
MessageDeduplicationId: Date.now().toString(), // Or a UUID, if content-based deduplication is off
|
|
2159
|
+
};
|
|
2150
2160
|
|
|
2151
|
-
|
|
2161
|
+
let sqsQueue;
|
|
2162
|
+
let sqsQueueCopy;
|
|
2163
|
+
if ( inputData.moduleType === 'track' ) {
|
|
2164
|
+
const [ firstResponse, secondResponse ] = await Promise.all( [
|
|
2165
|
+
sendMessageToFIFOQueue( sqsProduceQueue ),
|
|
2166
|
+
sendMessageToFIFOQueue( sqsProduceQueueCopy ),
|
|
2167
|
+
] );
|
|
2168
|
+
|
|
2169
|
+
sqsQueue = firstResponse;
|
|
2170
|
+
sqsQueueCopy = secondResponse;
|
|
2171
|
+
} else {
|
|
2172
|
+
sqsQueue = await sendMessageToQueue( sqsProduceQueue.QueueUrl, sqsProduceQueue.MessageBody );
|
|
2173
|
+
}
|
|
2152
2174
|
/* openSearch logs start */
|
|
2153
2175
|
id = `${inputData.moduleType}_${inputData.auditId}_${inputData.storeId}_${inputData.moduleType}_${inputData.auditType}_save_Info_${req?.user?.email}_${Date.now()}`;
|
|
2154
2176
|
const message = {
|
|
@@ -2156,6 +2178,7 @@ export async function save( req, res ) {
|
|
|
2156
2178
|
streams: streams,
|
|
2157
2179
|
sqsProduceQueue: sqsProduceQueue,
|
|
2158
2180
|
sqsQueue: sqsQueue,
|
|
2181
|
+
sqsQueueCopy: sqsQueueCopy,
|
|
2159
2182
|
};
|
|
2160
2183
|
temp.message =JSON.stringify( message );
|
|
2161
2184
|
await openSearchLog( temp, req.user, id );
|
|
@@ -22,7 +22,7 @@ eyeTestAuditRouter.post( '/summary-card', isAllowedSessionHandler, accessVerific
|
|
|
22
22
|
eyeTestAuditRouter.post( '/email-alert-log', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ] } ), isSuperAdmin, validate( emailAlertLogValid ), emailAlertLog );
|
|
23
23
|
|
|
24
24
|
eyeTestAuditRouter.post( '/cluster-list', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ] } ), validate( clusterListValid ), clusterList );
|
|
25
|
-
eyeTestAuditRouter.get( '/rm-list', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ] } ),
|
|
25
|
+
eyeTestAuditRouter.get( '/rm-list', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ] } ), validate( rmListValid ), rmList );
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
// setting
|