mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-16 23:40:32 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user