mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-16 23:40:32 +00:00
Bind methods and log errors for missing keys
This commit is contained in:
@@ -26,6 +26,9 @@ export class RedisSelfUpdatingETARepository extends BaseRedisETARepository imple
|
||||
this.startListeningForUpdates = this.startListeningForUpdates.bind(this);
|
||||
this.handleShuttleWillArriveAtStop = this.handleShuttleWillArriveAtStop.bind(this);
|
||||
this.handleShuttleUpdate = this.handleShuttleUpdate.bind(this);
|
||||
this.updateCascadingEta = this.updateCascadingEta.bind(this);
|
||||
this.getAverageTravelTimeSecondsWithFallbacks = this.getAverageTravelTimeSecondsWithFallbacks.bind(this);
|
||||
this.removeEtaIfExists = this.removeEtaIfExists.bind(this);
|
||||
}
|
||||
|
||||
private createHistoricalEtaTimeSeriesKey = (routeId: string, fromStopId: string, toStopId: string) => {
|
||||
@@ -63,7 +66,7 @@ export class RedisSelfUpdatingETARepository extends BaseRedisETARepository imple
|
||||
|
||||
return;
|
||||
} catch (error) {
|
||||
console.warn(`Failed to get average travel time: ${error instanceof Error ? error.message : String(error)}`);
|
||||
console.warn(`Failed to get average travel time for ${timeSeriesKey}: ${error instanceof Error ? error.message : String(error)}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user