-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Liveboards in the past hour #497
Comments
This issue is caused by the new NMBS systems not providing this data for the past anymore, requiring a fallback to parsing the website for liveboards in the past. This has always been lacking certain details, but at least the trains should show up correctly. I noticed the NMBS seems to have a new webpage for this, will see if I can adjust the fallback to be more reliable. |
Even https://www.belgiantrain.be/nl/travel-info/current/search-by-station does not really search in the past, so it seems like more work is needed on the iRail side to compute these results ourselves, for example based on their GTFS/GTFS-RT feed. That feed is missing information such as platforms, but it's quality may hopefully be sufficient for historic data. There is already a linked connections feed for the NMBS GTFS/GTFS-RT data on graph.irail.be, which should allow to consume the data in an easier way. |
Ok that's clear. I guessed it has something to do with the new NMBS systems. The most important reason that I opened this ticket that it worked fine the past couple of months, but since a few weeks not. The old variant is still available (halleluja), because the new variant is really a mess for filling in the compensation form. http://www.belgianrail.be/jp/nmbs-realtime/query.exe/nn?HWAI=VIEW!view=realtimeinfo |
Pushed a possible fix to staging.api.irail.be, could you check if the data is correct, or at least better? Please search back at least two hours in the past, otherwise you might still get a response from the "new" source which doesn't handle historical data that well (now you only get data from the fallback if the new one fails, this should probably be replaced by a cutoff based on the queried time) |
Thanks! Seems to work for now! I get a lot more trains now in the staging api!Could this be implemented at a later stage in the hyperrail app too? |
The fix has now been rolled out to production as well. Any apps querying in the past will benefit from this, as the whole fallback datasource logic is implemented on the server side. Leaving the issue open in order to improve the "failover" logic so the iRail API picks the best datasource for requests in the near past (typically between 1 minute and 1 hour in the past) |
Lately the liveboards are pretty buggy, especially when going into the past. Often not all trains are shown (only one or two or even nothing - error)
For example: https://api.irail.be//liveboard/?id=BE.NMBS.008893559&station=Gent-Sint-Pieters&date=281023&time=1934&arrdep=departure&lang=en&format=json&alerts=false
Only returns one train (19:37 to Oostende), which is of course not right.
The text was updated successfully, but these errors were encountered: