Switch the order of fallbacks (previous 2h first)

Data from the current day is more representative of current traffic conditions than the same data from a previous day.
This commit is contained in:
2025-11-14 10:49:23 -08:00
parent f8e7670b3f
commit 8621f10721
2 changed files with 10 additions and 10 deletions

View File

@@ -119,17 +119,17 @@ export class InMemorySelfUpdatingETARepository extends BaseInMemoryETARepository
toStopId: nextStop.stopId,
}, [
{
from: new Date(oneWeekAgo.getTime() - (twoHoursInMs)),
to: oneWeekAgo,
from: twoHoursAgo,
to: new Date(),
},
{
from: new Date(oneDayAgo.getTime() - (twoHoursInMs)),
to: oneDayAgo,
},
{
from: twoHoursAgo,
to: new Date(),
}
from: new Date(oneWeekAgo.getTime() - (twoHoursInMs)),
to: oneWeekAgo,
},
]);
if (travelTimeSeconds == undefined) return;

View File

@@ -140,17 +140,17 @@ export class RedisSelfUpdatingETARepository extends BaseRedisETARepository imple
toStopId: nextStop.stopId,
}, [
{
from: new Date(oneWeekAgo.getTime() - (twoHoursInMs)),
to: oneWeekAgo,
from: twoHoursAgo,
to: new Date(),
},
{
from: new Date(oneDayAgo.getTime() - (twoHoursInMs)),
to: oneDayAgo,
},
{
from: twoHoursAgo,
to: new Date(),
}
from: new Date(oneWeekAgo.getTime() - (twoHoursInMs)),
to: oneWeekAgo,
},
]);
if (travelTimeSeconds == undefined) return;