peter-mount / opendata

Latest & first public version of my code that monitors the UK Rail Network in real time using Open Data feeds
Other
12 stars 2 forks source link

STP Cancellation not removing an overlay #60

Open peter-mount opened 8 years ago

peter-mount commented 8 years ago

This sort of came in via twitter. Someone asked Southeastern why train schedule W04861 is going into London Charing X on Jan 2 2016 when that station is closed due to London Bridge.

He referred to RealTimeTrains which showed that schedule to be active but I showed it with an Overlay diverting it to London Victoria. NRE's site was also showing it as running to Charing X.

Chatting to Tom (RTT) on skype it appears that the overlay was deleted on Dec 23rd hence why he's showing it but for some reason I didn't delete it:

10/09-update.cif.gz:BSNW048611601021601020000010 POO2W409140124605004 EMU    100      B S          O
10/30-full.cif.gz:BSNW048611601021601020000010 POO2W409140124605004 EMU    100      B S          O
12/23-update.cif.gz:BSDW04861160102   

So, looking at it:

Overlay was created on Oct 9th

Full import of Oct 30th would have reset the database, the db should still have the overlay present

update for Dec 23rd shows it as being deleted but it wasn't deleted out of our database.

So there's an issue with ttupdate which isn't deleting schedule overlays. The offending code is in ScheduleDBUpdate line 145, SQL defined in line 57.

The CIF is correct (ignoring that it's likely an error that the overlay was deleted).