diff --git a/src/repositories/shuttle/eta/RedisSelfUpdatingETARepository.ts b/src/repositories/shuttle/eta/RedisSelfUpdatingETARepository.ts index 60e07b4..4f61368 100644 --- a/src/repositories/shuttle/eta/RedisSelfUpdatingETARepository.ts +++ b/src/repositories/shuttle/eta/RedisSelfUpdatingETARepository.ts @@ -133,6 +133,7 @@ export class RedisSelfUpdatingETARepository extends BaseRedisETARepository imple const oneDayAgo = new Date(referenceCurrentTime.getTime() - (60 * 60 * 24 * 1000)); const twoHoursAgo = new Date(referenceCurrentTime.getTime() - (120 * 60 * 1000)); + const twoHoursMs = 120 * 60 * 1000; const travelTimeSeconds = await this.getAverageTravelTimeSecondsWithFallbacks({ routeId: shuttle.routeId, fromStopId: currentStop.stopId, @@ -140,11 +141,11 @@ export class RedisSelfUpdatingETARepository extends BaseRedisETARepository imple }, [ { from: oneWeekAgo, - to: new Date(oneWeekAgo.getTime() + (60 * 60 * 1000)) + to: new Date(oneWeekAgo.getTime() + (twoHoursMs)) }, { from: oneDayAgo, - to: new Date(oneDayAgo.getTime() + (60 * 60 * 1000)) + to: new Date(oneDayAgo.getTime() + (twoHoursMs)) }, { from: twoHoursAgo,