Closed brnstz closed 8 years ago
This appears to be an issue with overlapping start/end dates. We prefer to get the service with the most recent start date, but the live API isn't returning that one:
bseitz=# select * from service_route_day where service_id = 'JG_B6-Weekday' and route_id = 'B67';
agency_id | route_id | service_id | day | start_date | end_date
-----------+----------+---------------+-----------+------------+------------
MTA NYCT | B67 | JG_B6-Weekday | friday | 2016-04-25 | 2016-06-29
MTA NYCT | B67 | JG_B6-Weekday | monday | 2016-04-25 | 2016-06-29
MTA NYCT | B67 | JG_B6-Weekday | tuesday | 2016-04-25 | 2016-06-29
MTA NYCT | B67 | JG_B6-Weekday | wednesday | 2016-04-25 | 2016-06-29
MTA NYCT | B67 | JG_B6-Weekday | thursday | 2016-04-25 | 2016-06-29
(5 rows)
bseitz=#
bseitz=#
bseitz=# select * from service_route_day where service_id = 'JG_B6-Weekday-SDon' and route_id = 'B67';
agency_id | route_id | service_id | day | start_date | end_date
-----------+----------+--------------------+-----------+------------+------------
MTA NYCT | B67 | JG_B6-Weekday-SDon | monday | 2016-04-04 | 2016-07-01
MTA NYCT | B67 | JG_B6-Weekday-SDon | tuesday | 2016-04-04 | 2016-07-01
MTA NYCT | B67 | JG_B6-Weekday-SDon | wednesday | 2016-04-04 | 2016-07-01
MTA NYCT | B67 | JG_B6-Weekday-SDon | thursday | 2016-04-04 | 2016-07-01
MTA NYCT | B67 | JG_B6-Weekday-SDon | friday | 2016-04-04 | 2016-07-01
Live departures for buses are showing trip_ids with "SDon" but scheduled departures don't have this string. Both trip_ids exist in the db. But why are they different? Example: