Process one by one transaction consumptions
MODIFY
src/migration/tasks/RecomputeAllTransactionsConsumptionsTask.ts
src/migration/tasks/RecomputeAllTransactionsConsumptionsTask.ts
@@ -83,7 +83,7 @@ export default class RecomputeAllTransactionsConsumptionsTask extends MigrationT
detailedMessages: { error: error.message, stack: error.stack }
});
}
- }, { concurrency: 5 }).then(() => {
+ }, { concurrency: 1 }).then(() => { // Concurrency = 1 to keep SCP up and running
const totalDurationSecs = Math.trunc((new Date().getTime() - timeTotalFrom) / 1000);
// Log in the default tenant
Utils.logActionsResponse(Constants.DEFAULT_TENANT, ServerAction.MIGRATION,

MODIFY
src/storage/mongodb/OCPPStorage.ts
src/storage/mongodb/OCPPStorage.ts
@@ -477,8 +477,6 @@ export default class OCPPStorage {
const meterValuesCountMDB = await global.database.getCollection<any>(tenantID, 'metervalues')
.aggregate([...aggregation, { $count: 'count' }], { allowDiskUse: true })
.toArray();
- // Add Created By / Last Changed By
- DatabaseUtils.pushCreatedLastChangedInAggregation(tenantID, aggregation);
// Sort
if (!dbParams.sort) {
dbParams.sort = { timestamp: 1 };

Process one by one transaction consumptions