tango-app-api-infra 3.1.34-beta.8 → 3.1.34-beta.9
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
|
@@ -91,7 +91,7 @@ export async function basicList( req, res ) {
|
|
|
91
91
|
for ( let client of clientList ) {
|
|
92
92
|
clients.push( client.clientId );
|
|
93
93
|
}
|
|
94
|
-
let storeList = await findStore( { 'clientId': { $in: clients }, 'status': 'active', 'edge.firstFile': true,
|
|
94
|
+
let storeList = await findStore( { 'clientId': { $in: clients }, 'status': 'active', 'edge.firstFile': true, 'storeProfile.open': { $exists: true }, 'storeProfile.close': { $exists: true }, 'storeProfile.timeZone': { $exists: true } },
|
|
95
95
|
{ 'storeName': 1, 'storeId': 1, 'ticketConfigs': 1, 'clientId': 1, 'storeProfile.open': 1, 'storeProfile.close': 1, 'storeProfile.timeZone': 1 } );
|
|
96
96
|
logger.info( { 'storeList': storeList, 'message': 'storeList' } );
|
|
97
97
|
|
|
@@ -799,7 +799,7 @@ export async function edgeApplogsCheck( req, res ) {
|
|
|
799
799
|
}
|
|
800
800
|
for ( let error of errorLogList.body.hits.hits ) {
|
|
801
801
|
const logCode = error._source.log_code;
|
|
802
|
-
const relevantCodes = [ 1003, 1011, 1022, 1024, 1025, 1000 ];
|
|
802
|
+
const relevantCodes = [ 1003, 1011, 1022, 1024, 1025, 1026, 1000 ];
|
|
803
803
|
if ( relevantCodes.includes( Number( logCode ) ) ) {
|
|
804
804
|
result.push( createLogCheck( error ) );
|
|
805
805
|
}
|
|
@@ -958,25 +958,27 @@ export async function edgeApplogsCheck( req, res ) {
|
|
|
958
958
|
updateIssue( findissueEdgeApp );
|
|
959
959
|
finalresult.push( findissueEdgeApp );
|
|
960
960
|
}
|
|
961
|
-
} else if ( findissue.code == '
|
|
961
|
+
} else if ( findissue.code == '1026' ) {
|
|
962
962
|
const occurringTimeParsed = dayjs( `${req.body.date} ${findissue.edgelog.occuringTime}` );
|
|
963
963
|
const ticketCreatedParsed = dayjs( `${req.body.date} ${istTimestamp}` );
|
|
964
964
|
const isOccurringTimeEarlier = occurringTimeParsed.isBefore( ticketCreatedParsed );
|
|
965
965
|
const existsInArray = finalresult.some( ( item ) =>
|
|
966
966
|
item.ticketId === ticket.ticketId,
|
|
967
967
|
);
|
|
968
|
-
if ( isOccurringTimeEarlier&&!existsInArray ) {
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
968
|
+
if ( isOccurringTimeEarlier &&!existsInArray ) {
|
|
969
|
+
if ( ( Number( findissue.edgelog.files_generated )-Number( findissue.edgelog.files_pushed ) )>1 ) {
|
|
970
|
+
findissueEdgeApp = {
|
|
971
|
+
ticketId: ticket.ticketId,
|
|
972
|
+
edgelog: findissue,
|
|
973
|
+
storeId: ticket.basicDetails.storeId,
|
|
974
|
+
primary: 'Internet Issues',
|
|
975
|
+
secondary: [ 'Internet slow' ],
|
|
976
|
+
};
|
|
977
|
+
}
|
|
976
978
|
updateIssue( findissueEdgeApp );
|
|
977
979
|
finalresult.push( findissueEdgeApp );
|
|
978
980
|
}
|
|
979
|
-
} else if ( findissue.code
|
|
981
|
+
} else if ( findissue.code == '1016' ) {
|
|
980
982
|
const occurringTimeParsed = dayjs( `${req.body.date} ${findissue.edgelog.occuringTime}` );
|
|
981
983
|
const ticketCreatedParsed = dayjs( `${req.body.date} ${istTimestamp}` );
|
|
982
984
|
const isOccurringTimeEarlier = occurringTimeParsed.isBefore( ticketCreatedParsed );
|
|
@@ -994,20 +996,20 @@ export async function edgeApplogsCheck( req, res ) {
|
|
|
994
996
|
updateIssue( findissueEdgeApp );
|
|
995
997
|
finalresult.push( findissueEdgeApp );
|
|
996
998
|
}
|
|
997
|
-
} else if ( findissue.code
|
|
999
|
+
} else if ( findissue.code == '1000' ) {
|
|
998
1000
|
const occurringTimeParsed = dayjs( `${req.body.date} ${findissue.edgelog.occuringTime}` );
|
|
999
1001
|
const ticketCreatedParsed = dayjs( `${req.body.date} ${istTimestamp}` );
|
|
1000
1002
|
const isOccurringTimeEarlier = occurringTimeParsed.isBefore( ticketCreatedParsed );
|
|
1001
1003
|
const existsInArray = finalresult.some( ( item ) =>
|
|
1002
1004
|
item.ticketId === ticket.ticketId,
|
|
1003
1005
|
);
|
|
1004
|
-
if ( isOccurringTimeEarlier
|
|
1006
|
+
if ( isOccurringTimeEarlier&&!existsInArray ) {
|
|
1005
1007
|
findissueEdgeApp = {
|
|
1006
1008
|
ticketId: ticket.ticketId,
|
|
1007
1009
|
edgelog: findissue,
|
|
1008
1010
|
storeId: ticket.basicDetails.storeId,
|
|
1009
|
-
primary: '
|
|
1010
|
-
secondary: [ '
|
|
1011
|
+
primary: 'Application Issues',
|
|
1012
|
+
secondary: [ 'Application crashed' ],
|
|
1011
1013
|
};
|
|
1012
1014
|
updateIssue( findissueEdgeApp );
|
|
1013
1015
|
finalresult.push( findissueEdgeApp );
|