Change the event name to SHUTTLE_WILL_ARRIVE_AT_STOP, and emit it before the stop is updated

This commit is contained in:
2025-11-11 19:10:13 -08:00
parent b9fefcc6a9
commit 9af50ddfe9
5 changed files with 12 additions and 11 deletions

View File

@@ -182,8 +182,8 @@ export class UnoptimizedInMemoryShuttleRepository
timestamp: new Date(travelTimeTimestamp),
shuttleId: shuttle.id,
};
this.emit(ShuttleRepositoryEvent.SHUTTLE_WILL_ARRIVE_AT_STOP, shuttleArrival);
await this.updateShuttleLastStopArrival(shuttleArrival);
this.emit(ShuttleRepositoryEvent.SHUTTLE_ARRIVED_AT_STOP, shuttleArrival);
}
}