Skip to content

Commit

Permalink
debug: Add logging before/after handling batch routing trip
Browse files Browse the repository at this point in the history
Tentatively trying to investigate issue #1011 on instances. This will
allow to see if the checkpoint handling caused issues, as the problem
seems to come from "old" trip queries, ie that should have long been
handled.

This commit can be reverted once the issue is solved
  • Loading branch information
tahini committed Sep 12, 2024
1 parent bd988c4 commit 68d6380
Showing 1 changed file with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,20 +162,26 @@ class TrRoutingBatch {
promiseQueue.clear();
}
try {
console.log('Start handling batch routing odTrip %d', odTripIndex);
await this.odTripTask(odTripIndex, {
trRoutingPort,
logBefore: logOdTripBefore,
logAfter: logOdTripAfter
});
} finally {
completedRoutingsCount++;
if (completedRoutingsCount % progressStep === 0) {
this.options.progressEmitter.emit('progress', {
name: 'BatchRouting',
progress: completedRoutingsCount / odTripsCount
});
try {
completedRoutingsCount++;
if (completedRoutingsCount % progressStep === 0) {
this.options.progressEmitter.emit('progress', {
name: 'BatchRouting',
progress: completedRoutingsCount / odTripsCount
});
}
console.log('Handled batch routing odTrip %d', odTripIndex);
checkpointTracker.handled(odTripIndex);
} catch(error) {
console.error(`Error completing od trip handling. The checkpoint will be missed: ${odTripIndex}: ${error}`);
}
checkpointTracker.handled(odTripIndex);
}
});
}
Expand Down

0 comments on commit 68d6380

Please sign in to comment.