peter-mount / nre-feeds

go library & Application for handling the NRE DarwinD3 feeds
Apache License 2.0
8 stars 0 forks source link

Delayed services are removed from the ldb results if the time is after the scheduled departure time #26

Open peter-mount opened 5 years ago

peter-mount commented 5 years ago

For this one if a service has been delayed but the current time is after the scheduled departure time then the service disappears.

For example just now I saw at LBG a service scheduled for 19:15 but was expected at 19:21. At 19:16 it disappeared off the boards.

I've already looked at this and the problem is that in LDB we store the services by the departure time, so when we look for departures at a station then it logically skips that one as it's outside of the search range.

This one will be tricky as we can either:

  1. keep the key as it was but look at the current forecast to see if it should be included
  2. change the key to match the forecast

The second option is not a good idea as it could end up corrupting the cache but the first option has the problem of how far back in time do we look.

This needs further thought