diff options
author | stuebinm | 2024-05-15 01:15:54 +0200 |
---|---|---|
committer | stuebinm | 2024-05-15 01:15:54 +0200 |
commit | 00dc52a6dcea99c7dc65fba5d397d085776bb9bd (patch) | |
tree | 6d8ee7f0ba19e82958ac4eb22931ccbbabecde06 /lib | |
parent | 6e257141cdf43730a04bf570887ddca031f9c1aa (diff) |
Server.GtfsRealtime: bugfix
can't believe it was this simple … but seems to be all that was wrong.
Tracktrain should now automatically remove tripUpdates for tickets whose
trip has ended more than five minutes ago (taking delay into account).
Nothing in the gtfs-rt spec says you should do this, but google likes to
complain if one doesn't do this.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Server/GTFS_RT.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Server/GTFS_RT.hs b/lib/Server/GTFS_RT.hs index 236f4cc..9c52e9c 100644 --- a/lib/Server/GTFS_RT.hs +++ b/lib/Server/GTFS_RT.hs @@ -115,7 +115,7 @@ gtfsRealtimeServer gtfs@GTFS{..} dbpool = (, stop, station) <$> extrapolateAtPosition LinearExtrapolator anchorEntities (int2Double (stopSequence stop)) let (lastAnchor, lastStop, lastStation) = last (catMaybes atStations) let stillRunning = trainAnchorDelay lastAnchor + toSeconds (stopArrival lastStop) tzseries today - < nowSeconds + 5 * 60 + > nowSeconds + 5 * 60 pure $ if not stillRunning then Nothing else Just $ defMessage & RT.id .~ UUID.toText (coerce key) |