FerryTempo / FTServer

A NodeJS implementation of the FerryTempo service.
https://www.ferrytempo.com/
1 stars 0 forks source link

Continue to process data if OpRouteAbbrev is empty for all boats #84

Closed ckulfan closed 3 months ago

ckulfan commented 3 months ago

Because of a WSDOT internal error, we received packets that had the OpRouteAbbrev array empty for all boats. This effectively breaks our code and results in us ignoring the data and instead returning stale data to the client.will

We will cache the "last known route" for a boat to use as a fallback if/when the route data is empty for the boat and the boat is still in service.

ckulfan commented 3 months ago

Added code and tests to compute routes and also cache them. We will use computed routes where possible and fallback on cache if the computed route is null (which happens when either the arriving or departing terminal is null as when the boat is in dock).