Check OCPI sessions on only finished sessions
MODIFY
src/client/ocpi/CpoOCPIClient.ts
src/client/ocpi/CpoOCPIClient.ts
@@ -536,7 +536,7 @@ export default class CpoOCPIClient extends OCPIClient {
`{{inSuccess}} Session(s) were successfully checked in ${executionDurationSecs}s`,
`{{inError}} Session(s) failed to be checked in ${executionDurationSecs}s`,
`{{inSuccess}} Session(s) were successfully checked and {{inError}} failed to be checked in ${executionDurationSecs}s`,
- 'No Sessions have been checked'
+ 'No Session has to be checked'
);
return result;
}
@@ -588,7 +588,7 @@ export default class CpoOCPIClient extends OCPIClient {
`{{inSuccess}} Location(s) were successfully checked in ${executionDurationSecs}s`,
`{{inError}} Location(s) failed to be checked in ${executionDurationSecs}s`,
`{{inSuccess}} Location(s) were successfully checked and {{inError}} failed to be checked in ${executionDurationSecs}s`,
- 'No Locations have been checked'
+ 'No Location has to be checked'
);
return result;
}
@@ -634,7 +634,7 @@ export default class CpoOCPIClient extends OCPIClient {
`{{inSuccess}} CDR(s) were successfully checked in ${executionDurationSecs}s`,
`{{inError}} CDR(s) failed to be checked in ${executionDurationSecs}s`,
`{{inSuccess}} CDR(s) were successfully checked and {{inError}} failed to be checked in ${executionDurationSecs}s`,
- 'No CDR to be checked'
+ 'No CDR has to be checked'
);
return result;
}

MODIFY
src/storage/mongodb/TransactionStorage.ts
src/storage/mongodb/TransactionStorage.ts
@@ -470,6 +470,7 @@ export default class TransactionStorage {
}
}
if (params.ocpiSessionChecked === true || params.ocpiSessionChecked === false) {
+ filters.stop = { $exists: true };
filters['ocpiData.session'] = { $exists: true };
filters['ocpiData.sessionCheckedOn'] = { $exists: params.ocpiSessionChecked };
}

Check OCPI sessions on only finished sessions