brnstz / bus

Mobile web app for discovering public transit in NYC --
https://token.live
MIT License
5 stars 2 forks source link

Filter stale service values #101

Closed brnstz closed 8 years ago

brnstz commented 8 years ago

Use the service_route_day table to filter here_result values when there is a more recent applicable serviceID for this day of the week.

The easiest way to do this is keep the query as is and filter results after the fact. This allows the possibility that a serviceID might expire for one route but still be applicable to another route. This could theoretically happen if the same agency ID re-used the service ID but didn't update files at the same time. Probably a better way to avoid this problem is to use a dataset ID (by URL) rather than relying on agency IDs.