tango-app-api-trax 3.9.66 → 3.9.67
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
|
@@ -925,8 +925,6 @@ export const flagTablesV1 = async ( req, res ) => {
|
|
|
925
925
|
|
|
926
926
|
// Lamda Service Call //
|
|
927
927
|
async function LamdaServiceCall( url, data, timeoutMs = 8000 ) {
|
|
928
|
-
const controller = new AbortController();
|
|
929
|
-
const timer = setTimeout( () => controller.abort(), timeoutMs );
|
|
930
928
|
try {
|
|
931
929
|
const requestOptions = {
|
|
932
930
|
method: 'POST',
|
|
@@ -934,8 +932,6 @@ async function LamdaServiceCall( url, data, timeoutMs = 8000 ) {
|
|
|
934
932
|
'Content-Type': 'application/json',
|
|
935
933
|
},
|
|
936
934
|
body: JSON.stringify( data ),
|
|
937
|
-
keepalive: true,
|
|
938
|
-
signal: controller.signal,
|
|
939
935
|
};
|
|
940
936
|
const response = await fetch( url, requestOptions );
|
|
941
937
|
if ( !response.ok ) {
|
|
@@ -946,8 +942,6 @@ async function LamdaServiceCall( url, data, timeoutMs = 8000 ) {
|
|
|
946
942
|
} catch ( error ) {
|
|
947
943
|
logger.error( { error: error, message: data, function: 'LamdaServiceCall' } );
|
|
948
944
|
return false;
|
|
949
|
-
} finally {
|
|
950
|
-
clearTimeout( timer );
|
|
951
945
|
}
|
|
952
946
|
}
|
|
953
947
|
|
|
@@ -2306,6 +2300,8 @@ export const flagTablesV2 = async ( req, res ) => {
|
|
|
2306
2300
|
mayNeedLambda ? LamdaServiceCall( LamdaURL, detectionPayload ) : Promise.resolve( null ),
|
|
2307
2301
|
] );
|
|
2308
2302
|
|
|
2303
|
+
console.log( lambdaResultData );
|
|
2304
|
+
|
|
2309
2305
|
if ( !getChecklistPerformanceData?.length ) {
|
|
2310
2306
|
return res.sendError( 'No data found', 204 );
|
|
2311
2307
|
}
|