Closed dfaulken closed 8 years ago
An addition to this could be a simple catch-all for obvious issues before the code begins the GTFS checks.
For example, we could say something like the following pseudocode (which I just turned into one line after writing out almost compilable code that would've warranted switching to slack :stuck_out_tongue: ):
if (time is_between 7am, 7pm && all_routes_are_done) send_email
Sure, but on 7/4. 12/25 etc. we'd get emails every 5 minutes for 12 hours (opened #4 for this).
From @werebus:
Downloading, unzipping, caching, and finding planned departure times within the next n
minutes is done. Just need to compare the two and decide how to handle any discrepancies.
We can now query the realtime feed and get a data structure in the same format as returned by the GTFS parser.
Question for @werebus or @sherson: what departures should we expect the realtime feed to return? Is it the next n
departures for a given route? Departures within the next n
hours?
My question was answered in #10. This issue is covered (in less broad terms) by #7.
@werebus suggested using the GTFS feed for deciding when the PVTA realtime feed should be displaying one bus or another.
Since it's a large CSV file, some caching will need to be done there - probably a separate script which grabs the export, parses it, and generates some kind of quickly-traversable file containing the data the every-5-minute script can use to determine when a given bus should be running. May run every day or so.